Skip to content

Tags: onlinemediagroup/psycopg2

Tags

2_7_1

Verified

This tag was signed with the committer’s verified signature.
dvarrazzo Daniele Varrazzo
Psycopg 2.7.1 released

What's new in psycopg 2.7.1
^^^^^^^^^^^^^^^^^^^^^^^^^^^

- Ignore `!None` arguments passed to `~psycopg2.connect()` and
  `~psycopg2.extensions.make_dsn()` (:ticket:`psycopg#517`).
- OpenSSL upgraded from major version 0.9.8 to 1.0.2 in the Linux wheel
  packages (:ticket:`psycopg#518`).
- Fixed build with libpq versions < 9.3 (:ticket:`psycopg#520`).

2_7

Verified

This tag was signed with the committer’s verified signature.
dvarrazzo Daniele Varrazzo
Psycopg 2.7 released

What's new in psycopg 2.7
-------------------------

New features:

- Added `~psycopg2.sql` module to generate SQL dynamically (:ticket:`psycopg#308`).
- Added :ref:`replication-support` (🎫`psycopg#322`). Main authors are
  Oleksandr Shulgin and Craig Ringer, who deserve a huge thank you.
- Added `~psycopg2.extensions.parse_dsn()` and
  `~psycopg2.extensions.make_dsn()` functions (:tickets:`psycopg#321, psycopg#363`).
  `~psycopg2.connect()` now can take both *dsn* and keyword arguments, merging
  them together.
- Added `~psycopg2.__libpq_version__` and
  `~psycopg2.extensions.libpq_version()` to inspect the version of the
  ``libpq`` library the module was compiled/loaded with
  (:tickets:`psycopg#35, psycopg#323`).
- The attributes `~connection.notices` and `~connection.notifies` can be
  customized replacing them with any object exposing an `!append()` method
  (:ticket:`psycopg#326`).
- Adapt network types to `ipaddress` objects when available. When not
  enabled, convert arrays of network types to lists by default. The old `!Inet`
  adapter is deprecated (:tickets:`psycopg#317, psycopg#343, psycopg#387`).
- Added `~psycopg2.extensions.quote_ident()` function (:ticket:`psycopg#359`).
- Added `~connection.get_dsn_parameters()` connection method (:ticket:`psycopg#364`).
- `~cursor.callproc()` now accepts a dictionary of parameters (:ticket:`psycopg#381`).
- Give precedence to `!__conform__()` over superclasses to choose an object
  adapter (:ticket:`psycopg#456`).
- Using Python C API decoding functions and codecs caching for faster
  unicode encoding/decoding (:ticket:`psycopg#473`).
- `~cursor.executemany()` slowness addressed by
  `~psycopg2.extras.execute_batch()` and `~psycopg2.extras.execute_values()`
  (:ticket:`psycopg#491`).
- Added ``async_`` as an alias for ``async`` to support Python 3.7 where
  ``async`` will become a keyword (:ticket:`psycopg#495`).
- Unless in autocommit, do not use :sql:`default_transaction_*` settings to
  control the session characteristics as it may create problems with external
  connection pools such as pgbouncer; use :sql:`BEGIN` options instead
  (🎫`psycopg#503`).
- `~connection.isolation_level` is now writable and entirely separated from
  `~connection.autocommit`; added `~connection.readonly`,
  `~connection.deferrable` writable attributes.

Bug fixes:

- Fixed error caused by missing decoding `~psycopg2.extras.LoggingConnection`
  (:ticket:`psycopg#483`).
- Fixed integer overflow in :sql:`interval` seconds (🎫`psycopg#512`).

Other changes:

- Dropped support for Python 2.5 and 3.1.
- Dropped support for client library older than PostgreSQL 9.1 (but older
  server versions are still supported).
- `~connection.isolation_level` doesn't read from the database but will return
  `~psycopg2.extensions.ISOLATION_LEVEL_DEFAULT` if no value was set on the
  connection.
- Empty arrays no more converted into lists if they don't have a type attached
  (:ticket:`psycopg#506`)

2_7_BETA_2

Verified

This tag was signed with the committer’s verified signature.
dvarrazzo Daniele Varrazzo
Psycopg 2.7 beta 2 released

What's new in psycopg 2.7
-------------------------

New features:

- Added `~psycopg2.sql` module to generate SQL dynamically (:ticket:`psycopg#308`).
- Added :ref:`replication-support` (🎫`psycopg#322`). Main authors are
  Oleksandr Shulgin and Craig Ringer, who deserve a huge thank you.
- Added `~psycopg2.extensions.parse_dsn()` and
  `~psycopg2.extensions.make_dsn()` functions (:tickets:`psycopg#321, psycopg#363`).
  `~psycopg2.connect()` now can take both *dsn* and keyword arguments, merging
  them together.
- Added `~psycopg2.__libpq_version__` and
  `~psycopg2.extensions.libpq_version()` to inspect the version of the
  ``libpq`` library the module was compiled/loaded with
  (:tickets:`psycopg#35, psycopg#323`).
- The attributes `~connection.notices` and `~connection.notifies` can be
  customized replacing them with any object exposing an `!append()` method
  (:ticket:`psycopg#326`).
- Adapt network types to `ipaddress` objects when available. When not
  enabled, convert arrays of network types to lists by default. The old `!Inet`
  adapter is deprecated (:tickets:`psycopg#317, psycopg#343, psycopg#387`).
- Added `~psycopg2.extensions.quote_ident()` function (:ticket:`psycopg#359`).
- Added `~connection.get_dsn_parameters()` connection method (:ticket:`psycopg#364`).
- `~cursor.callproc()` now accepts a dictionary of parameters (:ticket:`psycopg#381`).
- Give precedence to `!__conform__()` over superclasses to choose an object
  adapter (:ticket:`psycopg#456`).
- Using Python C API decoding functions and codecs caching for faster
  unicode encoding/decoding (:ticket:`psycopg#473`).
- `~cursor.executemany()` slowness addressed by
  `~psycopg2.extras.execute_batch()` and `~psycopg2.extras.execute_values()`
  (:ticket:`psycopg#491`).
- Added ``async_`` as an alias for ``async`` to support Python 3.7 where
  ``async`` will become a keyword (:ticket:`psycopg#495`).
- Unless in autocommit, do not use :sql:`default_transaction_*` settings to
  control the session characteristics as it may create problems with external
  connection pools such as pgbouncer; use :sql:`BEGIN` options instead
  (🎫`psycopg#503`).
- `~connection.isolation_level` is now writable and entirely separated from
  `~connection.autocommit`; added `~connection.readonly`,
  `connection.deferrable` writable attributes.

Bug fixes:

- Fixed error caused by missing decoding `~psycopg2.extras.LoggingConnection`
  (:ticket:`psycopg#483`).

Other changes:

- Dropped support for Python 2.5 and 3.1.
- Dropped support for client library older than PostgreSQL 9.1 (but older
  server versions are still supported).
- `~connection.isolation_level` doesn't read from the database but will return
  `~psycopg2.extensions.ISOLATION_LEVEL_DEFAULT` if no value was set on the
  connection.
- Empty arrays no more converted into lists if they don't have a type attached
  (:ticket:`psycopg#506`)

2_7_BETA_1

Verified

This tag was signed with the committer’s verified signature.
dvarrazzo Daniele Varrazzo
Psycopg 2.7 beta 1 released

What's new in psycopg 2.7
-------------------------

New features:

- Added `~psycopg2.sql` module to generate SQL dynamically (:ticket:`psycopg#308`).
- Added :ref:`replication-support` (🎫`psycopg#322`). Main authors are
  Oleksandr Shulgin and Craig Ringer, who deserve a huge thank you.
- Added `~psycopg2.extensions.parse_dsn()` and
  `~psycopg2.extensions.make_dsn()` functions (:tickets:`psycopg#321, psycopg#363`).
  `~psycopg2.connect()` now can take both *dsn* and keyword arguments, merging
  them together.
- Added `~psycopg2.__libpq_version__` and
  `~psycopg2.extensions.libpq_version()` to inspect the version of the
  ``libpq`` library the module was compiled/loaded with
  (:tickets:`psycopg#35, psycopg#323`).
- The attributes `~connection.notices` and `~connection.notifies` can be
  customized replacing them with any object exposing an `!append()` method
  (:ticket:`psycopg#326`).
- Adapt network types to `ipaddress` objects when available. When not
  enabled, convert arrays of network types to lists by default. The old `!Inet`
  adapter is deprecated (:tickets:`psycopg#317, psycopg#343, psycopg#387`).
- Added `~psycopg2.extensions.quote_ident()` function (:ticket:`psycopg#359`).
- Added `~connection.get_dsn_parameters()` connection method (:ticket:`psycopg#364`).
- `~cursor.callproc()` now accepts a dictionary of parameters (:ticket:`psycopg#381`).
- Give precedence to `!__conform__()` over superclasses to choose an object
  adapter (:ticket:`psycopg#456`).
- Using Python C API decoding functions and codecs caching for faster
  unicode encoding/decoding (:ticket:`psycopg#473`).
- `~cursor.executemany()` slowness addressed by
  `~psycopg2.extras.execute_batch()` and `~psycopg2.extras.execute_values()`
  (:ticket:`psycopg#491`).
- Added ``async_`` as an alias for ``async`` to support Python 3.7 where
  ``async`` will become a keyword (:ticket:`psycopg#495`).
- Unless in autocommit, do not use :sql:`default_transaction_*` settings to
  control the session characteristics as it may create problems with external
  connection pools such as pgbouncer; use :sql:`BEGIN` options instead
  (🎫`psycopg#503`).

Bug fixes:

- Throw an exception trying to pass ``NULL`` chars as parameters
  (:ticket:`psycopg#420`).
- Make `~psycopg2.extras.Range` objects picklable (:ticket:`psycopg#462`).
- Fixed error caused by missing decoding `~psycopg2.extras.LoggingConnection`
  (:ticket:`psycopg#483`).

Other changes:

- Dropped support for Python 2.5 and 3.1.
- Dropped support for client library older than PostgreSQL 9.1 (but older
  server versions are still supported).
- `~connection.isolation_level` doesn't read from the database but will return
  `~psycopg2.extensions.ISOLATION_LEVEL_DEFAULT` if no value was set on the
  connection.
- `~connection.set_isolation_level()` will throw an exception if executed
  inside a transaction; previously it would have silently rolled it back.
- Empty arrays no more converted into lists if they don't have a type attached
  (:ticket:`psycopg#506`)

2_6_2

Verified

This tag was signed with the committer’s verified signature.
dvarrazzo Daniele Varrazzo
Psycopg 2.6.2 released

- Fixed inconsistent state in externally closed connections
  (:tickets:`psycopg#263, psycopg#311, psycopg#443`).
- Report the server response status on errors (such as 🎫`psycopg#281`).
- Raise `!NotSupportedError` on unhandled server response status
  (:ticket:`psycopg#352`).
- Allow overriding string adapter encoding with no connection (:ticket:`psycopg#331`).
- The `~psycopg2.extras.wait_select` callback allows interrupting a
  long-running query in an interactive shell using :kbd:`Ctrl-C`
  (🎫`psycopg#333`).
- Fixed `!PersistentConnectionPool` on Python 3 (:ticket:`psycopg#348`).
- Fixed segfault on `repr()` of an unitialized connection (:ticket:`psycopg#361`).
- Allow adapting bytes using `~psycopg2.extensions.QuotedString` on Python 3
  (:ticket:`psycopg#365`).
- Added support for setuptools/wheel (:ticket:`psycopg#370`).
- Fix build on Windows with Python 3.5, VS 2015 (:ticket:`psycopg#380`).
- Fixed `!errorcodes.lookup` initialization thread-safety (:ticket:`psycopg#382`).
- Fixed `!read()` exception propagation in copy_from (:ticket:`psycopg#412`).
- Fixed possible NULL TZ decref  (:ticket:`psycopg#424`).
- `~psycopg2.errorcodes` map updated to PostgreSQL 9.5.

2_6_1

Verified

This tag was signed with the committer’s verified signature.
dvarrazzo Daniele Varrazzo
Psycopg 2.6.1 released

- Lists consisting of only `None` are escaped correctly (:ticket:`psycopg#285`).
- Fixed deadlock in multithread programs using OpenSSL (:ticket:`psycopg#290`).
- Correctly unlock the connection after error in flush (:ticket:`psycopg#294`).
- Fixed ``MinTimeLoggingCursor.callproc()`` (:ticket:`psycopg#309`).

2_6

Verified

This tag was signed with the committer’s verified signature.
dvarrazzo Daniele Varrazzo
Psycopg 2.6 is now

New features:

- Added support for large objects larger than 2GB. Many thanks to Blake Rouse
  and the MAAS Team for the feature development.
- Python `time` objects with a tzinfo specified and PostgreSQL :sql:`timetz`
  data are converted into each other (🎫`psycopg#272`).

Bug fixes:

- Json apapter's `!str()` returns the adapted content instead of the `!repr()`
  (:ticket:`psycopg#191`).

2_5_5

Verified

This tag was signed with the committer’s verified signature.
dvarrazzo Daniele Varrazzo
Psycopg 2.5.5 released

- Named cursors used as context manager don't swallow the exception on exit
  (:ticket:`psycopg#262`).
- `cursor.description` can be pickled (:ticket:`psycopg#265`).
- Propagate read error messages in COPY FROM (:ticket:`psycopg#270`).
- PostgreSQL time 24:00 is converted to Python 00:00 (:ticket:`psycopg#278`).

2_5_4

Verified

This tag was signed with the committer’s verified signature.
dvarrazzo Daniele Varrazzo
Psycopg 2.5.4 released

- Added :sql:`jsonb` support for PostgreSQL 9.4 (🎫`psycopg#226`).
- Fixed segfault if COPY statements are passed to `~cursor.execute()` instead
  of using the proper methods (:ticket:`psycopg#219`).
- Force conversion of pool arguments to integer to avoid potentially unbounded
  pools (:ticket:`psycopg#220`).
- Cursors :sql:`WITH HOLD` don't begin a new transaction upon move/fetch/close
  (🎫`psycopg#228`).
- Cursors :sql:`WITH HOLD` can be used in autocommit (🎫`psycopg#229`).
- `~cursor.callproc()` doesn't silently ignore an argument without a length.
- Fixed memory leak with large objects (:ticket:`psycopg#256`).
- Make sure the internal ``_psycopg.so`` module can be imported stand-alone (to
  allow modules juggling such as the one described in 🎫`psycopg#201`).

2_5_3

Verified

This tag was signed with the committer’s verified signature.
dvarrazzo Daniele Varrazzo
Psycopg 2.5.3 released

- Work around `pip issue psycopg#1630 <https://github.com/pypa/pip/issues/1630>`__
  making installation via ``pip -e git+url`` impossible (:ticket:`#18`).
- Copy operations correctly set the `cursor.rowcount` attribute
  (:ticket:`psycopg#180`).
- It is now possible to call `get_transaction_status()` on closed connections.
- Fixed unsafe access to object names causing assertion failures in
  Python 3 debug builds (:ticket:`psycopg#188`).
- Mark the connection closed if found broken on `poll()` (from 🎫`psycopg#192`
  discussion)
- Fixed handling of dsn and closed attributes in connection subclasses
  failing to connect (from 🎫`psycopg#192` discussion).
- Added arbitrary but stable order to `Range` objects, thanks to
  Chris Withers (:ticket:`psycopg#193`).
- Avoid blocking async connections on connect (:ticket:`psycopg#194`). Thanks to
  Adam Petrovich for the bug report and diagnosis.
- Don't segfault using poorly defined cursor subclasses which forgot to call
  the superclass init (:ticket:`psycopg#195`).
- Mark the connection closed when a Socket connection is broken, as it
  happens for TCP connections instead (:ticket:`psycopg#196`).
- Fixed overflow opening a lobject with an oid not fitting in a signed int
  (:ticket:`psycopg#203`).
- Fixed handling of explicit default ``cursor_factory=None`` in
  `connection.cursor()` (:ticket:`psycopg#210`).
- Fixed possible segfault in named cursors creation.
- Fixed debug build on Windows, thanks to James Emerton.