Psycopg 3.3.0

3.3.0
Added 6
  • Add template strings queries
  • Enable adaptation of Python objects to PostgreSQL composites and back even if they are not sequences or if they take keyword arguments
  • Add Cursor.set_result() and Cursor.results() to move across the result sets of queries executed through executemany() or execute() with multiple statements
  • Add Transaction status to report the status during and after a transaction() block
  • Add pq.PGconn.used_gssapi attribute and Capabilities.has_used_gssapi() function
  • Add ConnectionInfo.full_protocol_version attribute and Capabilities.has_full_protocol_version() function
Changed 3
  • Cursors are now iterators, not just iterables, allowing next(cur) or anext(cur) to be called
  • Allow to change loaders using register_loader() on Cursor.adapters after a query result has been already returned
  • Disable default GSSAPI preferential connection in the binary package
Removed 1
  • Drop support for Python 3.8 and 3.9

New top-level features

  • Add template strings queries (ticket #1054).
  • More flexible composite adaptation: it is now possible to adapt Python objects to PostgreSQL composites and back even if they are not sequences or if they take keyword arguments (ticket #932, ticket #1202).
  • Cursors are now iterators, not just iterables. This means you can call next(cur) or anext(cur), which is useful as a type-safe expression (ticket #1064).
  • Add Cursor.set_result() and Cursor.results() to move across the result sets of queries executed though executemany() or execute() with multiple statements (tickets #1080, #1170).
  • Add Transaction status to report the status during and after a transaction() block (ticket #969).
  • Allow to change loaders using register_loader() on Cursor.adapters after a query result has been already returned (ticket #884). New libpq wrapper features
  • Add pq.PGconn.used_gssapi attribute and Capabilities.has_used_gssapi() function (ticket #1138).
  • Add ConnectionInfo.full_protocol_version attribute, Capabilities.has_full_protocol_version() function (ticket #1079). Other changes
  • Disable default GSSAPI preferential connection in the binary package (ticket #1136). Warning Please explicitly set the gssencmode connection parameter or the PGGSSENCMODE environment variable to interact reliably with the GSSAPI.
  • Drop support for Python 3.8 (ticket #976) and 3.9 (ticket #1056).
View original

Upgraded? How did it go?

Discussion