Psycopg

Latest version: v3.2.6

Safety actively analyzes 723177 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 8

3.1.14

^^^^^^^^^^^^^^

- Fix :ref:`interaction with gevent <gevent>` (:ticket:`527`).
- Add support for PyPy (:ticket:`686`).

.. _gevent: https://www.gevent.org/

3.1.13

^^^^^^^^^^^^^^

- Raise `DataError` instead of whatever internal failure trying to dump a
`~datetime.time` object with with a `!tzinfo` specified as
`~zoneinfo.ZoneInfo` (ambiguous offset, see :ticket:`652`).
- Handle gracefully EINTR on signals instead of raising `InterruptedError`,
consistently with :pep:`475` guideline (:ticket:`667`).
- Fix support for connection strings with multiple hosts/ports and for the
``load_balance_hosts`` connection parameter (:ticket:`674`).
- Fix memory leak receiving notifications in Python implementation
(:ticket:`679`).

3.1.12

^^^^^^^^^^^^^^

- Fix possible hanging if a connection is closed while querying (:ticket:`608`).
- Fix memory leak when `~register_*()` functions are called repeatedly
(:ticket:`647`).
- Release Python 3.12 binary packages.

3.1.11

^^^^^^^^^^^^^^

- Avoid caching the parsing results of large queries to avoid excessive memory
usage (:ticket:`628`).
- Fix integer overflow in C/binary extension with OID > 2^31 (:ticket:`630`).
- Fix loading of intervals with days and months or years (:ticket:`643`).
- Work around excessive CPU usage on Windows (reported in :ticket:`645`).
- Fix building on Solaris and derivatives (:ticket:`632`).
- Fix possible lack of critical section guard in async
`~AsyncCursor.executemany()`.
- Fix missing pipeline fetch in async `~AsyncCursor.scroll()`.
- Build binary packages with libpq 15.4, which allows group-readable
permissions on the SSL certificate on the client (:ticket:`528`).

3.1.10

^^^^^^^^^^^^^^

- Allow JSON dumpers to dump `bytes` directly instead of `str`,
for better compatibility with libraries like orjson and msgspec
(:ticket:`569`)
- Fix prepared statement cache validation when exiting pipeline mode (or
`~Cursor.executemany()`) in case an error occurred within the pipeline
(:ticket:`585`).
- Fix `connect()` to avoid "leaking" an open `~pq.PGconn` attached to the
`OperationalError` in case of connection failure. `Error.pgconn` is now a
shallow copy of the real libpq connection, and the latter is closed before
the exception propagates (:ticket:`565`).
- Fix possible (ignored) exception on objects deletion (:ticket:`591`).
- Don't clobber a Python exception raised during COPY FROM with the resulting
`!QueryCanceled` raised as a consequence (:ticket:`593`).
- Fix resetting `Connection.read_only` and `~Connection.deferrable` to their
default value using `!None` (:ticket:`612`).
- Add support for Python 3.12.

3.1.9

^^^^^^^^^^^^^

- Fix `TypeInfo.fetch()` using a connection in `!sql_ascii` encoding
(:ticket:`503`).
- Fix "filedescriptor out of range" using a large number of files open
in Python implementation (:ticket:`532`).
- Allow JSON dumpers to be registered on `!dict` or any other object, as was
possible in psycopg2 (:ticket:`541`).
- Fix canceling running queries on process interruption in async connections
(:ticket:`543`).
- Fix loading ROW values with different types in the same query using the
binary protocol (:ticket:`545`).
- Fix dumping recursive composite types (:ticket:`547`).

Page 3 of 8

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.