Psycopg2

Latest version: v2.9.10

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

Scan your dependencies

Page 8 of 14

2.4.3

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

- connect() supports all the keyword arguments supported by the
database
- Added 'new_array_type()' function for easy creation of array
typecasters.
- Added support for arrays of hstores and composite types (:ticket:`66`).
- Fixed segfault in case of transaction started with connection lost
(and possibly other events).
- Fixed adaptation of Decimal type in sub-interpreters, such as in
certain mod_wsgi configurations (:ticket:`52`).
- Rollback connections in transaction or in error before putting them
back into a pool. Also discard broken connections (:ticket:`62`).
- Lazy import of the slow uuid module, thanks to Marko Kreen.
- Fixed NamedTupleCursor.executemany() (:ticket:`65`).
- Fixed --static-libpq setup option (:ticket:`64`).
- Fixed interaction between RealDictCursor and named cursors
(:ticket:`67`).
- Dropped limit on the columns length in COPY operations (:ticket:`68`).
- Fixed reference leak with arguments referenced more than once
in queries (:ticket:`81`).
- Fixed typecasting of arrays containing consecutive backslashes.
- 'errorcodes' map updated to PostgreSQL 9.1.

2.4.2

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

- Added 'set_session()' method and 'autocommit' property to the
connection. Added support for read-only sessions and, for PostgreSQL
9.1, for the "repeatable read" isolation level and the "deferrable"
transaction property.
- Psycopg doesn't execute queries at connection time to find the
default isolation level.
- Fixed bug with multithread code potentially causing loss of sync
with the server communication or lock of the client (:ticket:`55`).
- Don't fail import if mx.DateTime module can't be found, even if its
support was built (:ticket:`53`).
- Fixed escape for negative numbers prefixed by minus operator
(:ticket:`57`).
- Fixed refcount issue during copy. Reported and fixed by Dave
Malcolm (:ticket:`58`, Red Hat Bug 711095).
- Trying to execute concurrent operations on the same connection
through concurrent green thread results in an error instead of a
deadlock.
- Fixed detection of pg_config on Window. Report and fix, plus some
long needed setup.py cleanup by Steve Lacy: thanks!

2.4.1

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

- Use own parser for bytea output, not requiring anymore the libpq 9.0
to parse the hex format.
- Don't fail connection if the client encoding is a non-normalized
variant. Issue reported by Peter Eisentraut.
- Correctly detect an empty query sent to the backend (:ticket:`46`).
- Fixed a SystemError clobbering libpq errors raised without SQLSTATE.
Bug vivisectioned by Eric Snow.
- Fixed interaction between NamedTuple and server-side cursors.
- Allow to specify --static-libpq on setup.py command line instead of
just in 'setup.cfg'. Patch provided by Matthew Ryan (:ticket:`48`).

2.4

-------------------------

New features and changes:

- Added support for Python 3.1 and 3.2. The conversion has also
brought several improvements:

- Added 'b' and 't' mode to large objects: write can deal with both
bytes strings and unicode; read can return either bytes strings
or decoded unicode.
- COPY sends Unicode data to files implementing 'io.TextIOBase'.
- Improved PostgreSQL-Python encodings mapping.
- Added a few missing encodings: EUC_CN, EUC_JIS_2004, ISO885910,
ISO885916, LATIN10, SHIFT_JIS_2004.
- Dropped repeated dictionary lookups with unicode query/parameters.

- Improvements to the named cursors:

- More efficient iteration on named cursors, fetching 'itersize'
records at time from the backend.
- The named cursors name can be an invalid identifier.

- Improvements in data handling:

- Added 'register_composite()' function to cast PostgreSQL
composite types into Python tuples/namedtuples.
- Adapt types 'bytearray' (from Python 2.6), 'memoryview' (from
Python 2.7) and other objects implementing the "Revised Buffer
Protocol" to 'bytea' data type.
- The 'hstore' adapter can work even when the data type is not
installed in the 'public' namespace.
- Raise a clean exception instead of returning bad data when
receiving bytea in 'hex' format and the client libpq can't parse
them.
- Empty lists correctly roundtrip Python -> PostgreSQL -> Python.

- Other changes:

- 'cursor.description' is provided as named tuples if available.
- The build script refuses to guess values if 'pg_config' is not
found.
- Connections and cursors are weakly referenceable.

Bug fixes:

- Fixed adaptation of None in composite types (:ticket:`26`). Bug
report by Karsten Hilbert.
- Fixed several reference leaks in less common code paths.
- Fixed segfault when a large object is closed and its connection no
more available.
- Added missing icon to ZPsycopgDA package, not available in Zope
2.12.9 (:ticket:`30`). Bug report and patch by Pumukel.
- Fixed conversion of negative infinity (:ticket:`40`). Bug report and
patch by Marti Raudsepp.

2.3.2

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

- Fixed segfault with middleware not passing DateStyle to the client
(:ticket:`24`). Bug report and patch by Marti Raudsepp.

2.3.1

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

- Fixed build problem on CentOS 5.5 x86_64 (:ticket:`23`).

Page 8 of 14

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.