Skip to content

Tags: dotlambda/asyncpg

Tags

v0.18.3

Toggle v0.18.3's commit message

Verified

This tag was signed with the committer’s verified signature.
elprans Elvis Pranskevichus
asyncpg v0.18.3

Bug Fixes
---------

* Fix bswap on *BSD
  (by @elprans in a6b7775 for MagicStack#313)

* Make sure idle never-acquired pool connections are closed due to inactivity
  (by @elprans in 69cbfd0 for MagicStack#389)

v0.18.2

Toggle v0.18.2's commit message

Verified

This tag was signed with the committer’s verified signature.
elprans Elvis Pranskevichus
asyncpg v0.18.2

Bug Fixes
---------

* Revert "Stop treating ReadyForQuery as a universal result indicator"
  to fix stability regression.
  (by @elprans in 04b6748)

* Correctly ignore all incoming messages after the Terminate message
  (by @elprans in 787317f)

* Properly cleanup connections closed by remote
  (by @elprans in 4393a15 for MagicStack#385)

v0.18.1

Toggle v0.18.1's commit message

Verified

This tag was signed with the committer’s verified signature.
elprans Elvis Pranskevichus
asyncpg v0.18.1

Bug Fixes
---------

* Fix DNS parsing regression
  (by @elprans in 8b98e7b)

v0.18.0

Toggle v0.18.0's commit message

Verified

This tag was signed with the committer’s verified signature.
elprans Elvis Pranskevichus
asyncpg v0.18.0

Improvements
------------

* Implement `Record.get()`
  (by @elprans in 2b93ee5 for MagicStack#330)

* Internal asyncpg errors are now consistently raised as
  `InternalClientError` (by @elprans in 263de3f)

* Allow mappings as composite type input
  (by @elprans in eaa2fa1 for MagicStack#349)

* Add `BitString.to_int()` and `BitString.from_int()`
  (by @percontation in ffd134e)

* Allow 'sslmode' in DSNs
  (by @percontation in 0304288)

* Add support for specifying multiple host addresses when connecting
  (by @elprans in 1d650ed for MagicStack#257)

* Low-level protocol implementation has been tweaked and
  optimized for slightly better performance in certain scenarios
  (by @elprans in 7a81613 and cc053fe)

* Queries with cached statements now generate fewer TCP packets
  (by @aleksey-mashanov in bf07199)

* Allow aliasing builtin types by name in `set_builtin_type_codec()`
  (by @elprans in 687127e)

* Factor out generic PostgreSQL protocol helpers into a separate package
  (by @1st1 in f0adefc)

* Fix tests and enable CI for PostgreSQL 11
  (by @elprans in ddb0ec2 and 716fd9d)

Bug Fixes
---------

* Handle and ignore permission errors when attempting to read .pgpass
  (by @elprans in df7830f for MagicStack#356)

* Fix decoding of fractional timestamps before Postgres epoch
  (by @elprans in a7eaf2b for MagicStack#363)

v0.17.0

Toggle v0.17.0's commit message

Verified

This tag was signed with the committer’s verified signature.
elprans Elvis Pranskevichus
asyncpg v0.17.0

Improvements
------------

Official support for Python 3.7.

Bug Fixes
---------

* Fix garbage collection of connections and emit a `ResourceWarning`
  if an unclosed connection is garbage collected.
  (by @1st1 in d9a236e for MagicStack#323)

* Raise a clear error if there's a race in pool intialization.
  (by @1st1 in 3565ef8 for MagicStack#320)

* Channel names in `Connection.add_listener()` and
  `Connection.remove_listener()` are now quoted properly.
  (by @sqwishy in 3e6ade6)

* Fixed endianness detection on *BSD systems.
  (by @elprans in 8c83add for MagicStack#313)

* Fixed handling of large type OIDs.
  (by @elprans in 2624bdb for MagicStack#300)

v0.16.0

Toggle v0.16.0's commit message

Verified

This tag was signed with the committer’s verified signature.
elprans Elvis Pranskevichus
asyncpg v0.16.0

Behavior Changes
----------------

`Pool.close()` now waits until all acquired connections are released.
Hence, the below code will now hang indefinitely:

```python
conn = await pool.acquire()
await pool.close()
```

Asyncpg will log a warning if `pool.close()` takes over 60 seconds to
complete.  It is advisable to use `asyncio.wait_for()` to set a timeout.

Improvements
------------

* Add support for reading passwords from .pgpass
  (by @elprans in 55a372f for MagicStack#267)

* Add Connection.is_in_transaction() (MagicStack#297)
  (by @bcaudell95 in cf523be for MagicStack#297)

* Added codec for built-in type tid
  (by @fantix in cddea9c)

* Allow setting custom codecs on domains and enumerated types
  (by @elprans in 3139322)

* Allow passing datetime.date instances as timestamp input
  (by @elprans in e8cc627 for MagicStack#288)

* Implement support for pool connection rotation
  (by @elprans in 4d209b7 for MagicStack#291)

Bug Fixes
---------

* Prohibit non-iterable containers to be passed as array input
  (by @elprans in a2fa7b2)

* Decode numeric zeros with correct scale
  (by Dmitriy Chugunov in 4124f7d)

* Fix handling of OIDs >= 2**31
  (by @elprans in 8dd7a6c for MagicStack#279)

* Make Pool.close() wait until all checked out connections are released
  (by @elprans in 7a0585a for MagicStack#290)

* Fix type codec cache races
  (by @elprans in 482a186 for MagicStack#278)

* Raise a consistent exception on input encoding errors
  (by @elprans in 0ddfa46 for MagicStack#260)

v0.15.0

Toggle v0.15.0's commit message

Verified

This tag was signed with the committer’s verified signature.
elprans Elvis Pranskevichus
asyncpg v0.15.0

Behavior Changes
----------------

asyncpg no longer uses the common statement cache for explicit
prepared statements, so `Connection.prepare()` always returns a
new prepared statement (by @vangheem in a19ce50).

Bug Fixes
---------

* Initialize statement codecs immediately after Prepare
  (by @elprans in 803c115 for MagicStack#241)

* Fix server version parsing when it contains trailing data
  (by @elprans in 05dce25 for MagicStack#250)

v0.14.0

Toggle v0.14.0's commit message

Verified

This tag was signed with the committer’s verified signature.
elprans Elvis Pranskevichus
asyncpg v0.14.0

Backwards Incompatible Changes
------------------------------

asyncpg now reports the server version as x.0.y for PostgreSQL 10.0 and later.
This is in alignment with how upstream is interpreting the "minor" version
component now. (@elprans in 1fa12fe)

Improvements
------------

* Add CrateDB detection
  (by @mfussenegger in afc1038)

Bug Fixes
---------

* Fix custom codec example to not use the obsolete "binary" parameter
  (by @elprans in f4e17dd)

* Make prepared statement uid generator global
  (by @1st1 in 3e43fcf)

* Document pgbouncer-related prepared statement breakage
  (by @elprans in 4a3713f for MagicStack#121)

* Fix unaligned access issues in host-network byte I/O on ARM
  (by @elprans in c04576d for MagicStack#216)

* Fix issues with timetz type I/O
  (by Vitaliy Burovoy in 7b6c083)

* Consistently use postgres/postgres as database/user pair in tests
  (by @elprans in b4ce740)

* Bump Cython and uvloop in .ci/requirements.txt
  (by @elprans in fd3a3b8)

* Support timeouts in Connection.close() and Pool.release()
  (by @elprans in bdfdd89 for MagicStack#220)

* Catch exceptions in asynchronous tasks when testing
  (by @elprans in 695b8f0)

* fix Range.__hash__
  (by @eumiro in 46f468c)

* Guard transaction methods against underlying connection release
  (by @elprans in 59e2878 for MagicStack#232)

* Fix python examples + typo
  (by @vitaly-burovoy in b10e883)

* Invalidate type cache on schema changes affecting statement result.
  (by @vitaly-burovoy in b04556e)

v0.13.0

Toggle v0.13.0's commit message

Verified

This tag was signed with the committer’s verified signature.
elprans Elvis Pranskevichus
asyncpg v0.13.0

Backwards Incompatible Changes
------------------------------

* Drop support for PostgreSQL 9.1
  (by @elprans in eaf298b)

* Remove the deprecated "binary" parameter from `Connection.set_type_codec()`
  (by @elprans in 9ad6625)

New Features
------------

* Add support for PostgreSQL 10
  (by @elprans)

Bug Fixes
---------

* Document that single fetches can return None
  (by @khazhyk in 23394c9)

* Fix type introspection being very slow on large databases
  (by @elprans in e0c44ce for MagicStack#186)

* Fix copy tests on PostgreSQL < 9.4
  (by @elprans in 327058f)

* Fix DeprecationWarning in tests
  (by @elprans in 3f9523c)

* Fix intermittent authentication failures against PostgreSQL 10 servers
  (by @elprans in 498213e for MagicStack#158)

* Do not attempt to connect to Unix sockets on Windows when host is not set
  (by @elprans in 8a32fc4 for MagicStack#184)

* Guard against incorrect use of resources associated with a connection
  (by @elprans in 089ac81, 93bf26f for MagicStack#190)

* Warn when there are active listeners on a connection that is released
  (by @elprans in d085d2c for MagicStack#190)

* Add a test for cursors on a standby replica.
  (by @elprans in c484a47 for MagicStack#66)

* Clarify the argument/parameter count mismatch exception
  (by @elprans in b6fe018 for MagicStack#178)

* Fix `TypeError` on `get_attributes` when result has no columns
  (by @fantix in f29de23)

* protocol: Use `try`-`finally` explicitly every time we create a waiter
  (by @1st1 in 50edd8c)

* Call correct parent constructor in `InterfaceWarning.__init__`
  (by @elprans in eec98b0)

* Allow grabbing the version information programmatically.
  (by @s0undt3ch in fa6dbc4)

* Use the general statement cache for type introspection
  (by @elprans in 57c9ffd for MagicStack#198)

* Fix issues with inet type I/O
  (by @elprans in e54f02e for MagicStack#37)

* Handle inactive connection closes while stored in the pool
  (by @AmatanHead in 9744ade)

v0.12.0

Toggle v0.12.0's commit message
New Features

* Implement `as_dict()` method for `PostgresMessage`.
  (by @vitaly-burovoy in 90725f1)

* Add API for receiving log messages `connection.add_log_listener()`.
  (by @vitaly-burovoy and @1st1 in 1b1893d and f072f88 for MagicStack#144)

* Add support for "tuple" exchange format for codec overrides.
  (by @elprans in 0453243 and d27dda7)

* Implement binary format codec for numeric type.
  (by @elprans in a5413eb for MagicStack#157)

Bug Fixes

* Fix boundary checks for integers.
  (by @vitaly-burovoy in e082910 and dfcf135)

* Fix handling of `NULL`s in copy_records_to_table().
  (by @elprans in 991b1ae for MagicStack#153)

* Raise an error when a binary `COPY FROM` is attempted w/o appropriate codec.
  (by @elprans in 7aac14e for MagicStack#157)

* Fix `Record.items()` to support duplicate keys. See MagicStack#28 for details.
  (by @1st1 in 39b390c for MagicStack#28)

* Fix `Record.keys()` to correctly return duplicate keys. See MagicStack#28.
  (by @1st1 in b06114d for MagicStack#28)

* Call notifications listeners using `loop.call_soon()`.
  (by @1st1 in 83d08bd)

* Make `PoolConnectionProxy` more dynamic. Fixes MagicStack#155.
  (by @1st1 in 6ca1f28 for MagicStack#155)

* Make sure `set_type_codec()` overrides core codec for all formats.
  (by @elprans in 9c32b86 for MagicStack#140)

* New severity "V" field as "severity_en" attribute.
  (by @vitaly-burovoy in 35bce5a)

* Make interval decoding logic match that of psycopg2.
  (by @elprans in 6b48443 for MagicStack#150)