Zum Inhalt springen

MagicStack Release Notes

Einträge
30
Quellen
1
Zuletzt aktualisiert

Folge MagicStack, um die Release Notes in deinen Feed zu holen.

Asyncpg von MagicStack

Asyncpg 0.32.0: Python 3.15, PostgreSQL 19 und neuer Pool-Parameter

Asyncpg 0.32.0 unterstützt Python 3.15 und PostgreSQL 19, macht pool min_size zu einer dauerhaft gehaltenen Mindestanzahl an Verbindungen (neuer Parameter init_size steuert die Startverbindungen), beschleunigt die SCRAM-Passwortableitung und behebt u. a. einen Pool-Deadlock nach Protokollabbruch sowie die Beachtung von Connection.close(timeout=...).

Improvements

  • Support Python 3.15 (#1367, #1378) (by @elprans in 1b118464 and 58c0c595)

  • Support PostgreSQL 19 (#1379) (by @elprans in 8d2a5aed)

  • Make pool min_size a maintained connection floor and add init_size to control the number of connections opened at startup (#1323). Idle connections at or below min_size are retained, and closed connections are replaced in the background. init_size defaults to min_size. To preserve the previous behavior, where the pool could drain to zero, replace min_size=N with init_size=N, min_size=0. (by @shatilov-diman in 67a1cbc5)

  • Use hashlib.pbkdf2_hmac() for faster SCRAM password derivation (#1359) (by @twelfthlabor in 00319a9b)

  • Use the statement cache for copy_records_to_table() introspection (#1360) (by @matemax in dd058652)

Fixes

  • Clean up connections rejected by target_session_attrs immediately so an unresponsive rejected host cannot delay the selected connection, and cleanup tasks cannot outlive the event loop. Rejected connections are aborted without waiting for a graceful disconnect; servers may log "unexpected EOF on client connection" if the Terminate message is not delivered before the transport closes.

  • Fix a connection pool deadlock when releasing a connection after a protocol abort (#1324) (by @pchaseh in 4a83cc2f)

  • Honor Connection.close(timeout=...) while waiting for a pending cancellation (#1361) (by @gyanu2507 in c06bcb4d) …

Originalquelle(öffnet in neuem Tab)Problem melden

Asyncpg von MagicStack

asyncpg 0.31.0

asyncpg 0.31.0 unterstützt Python 3.14 mit experimentellem Subinterpreter-/Freethreading-Support, behebt Probleme bei Verbindungen und entfernt die Unterstützung für Python 3.8.

Enable Python 3.14 with experimental subinterpreter/freethreading support.

Improvements

  • Add Python 3.14 support, experimental subinterpreter/freethreading support (#1279) (by @elprans in 9e42642b)

  • Avoid performing type introspection on known types (#1243) (by @elprans in 5c9986c4)

  • Make prepare() not use named statements by default when cache is disabled (#1245) (by @elprans in 5b14653e)

  • Implement connection service file functionality (#1223) (by @AndrewJackson2020 in 1d63bb15)

Fixes

  • Fix multi port connection string issue (#1222) (by @AndrewJackson2020 in 01c0db7b)

  • Avoid leaking connections if _can_use_connection fails (#1269) (by @yuliy-openai in e94302d2)

Other

  • Drop support for EOL Python 3.8 (#1281) (by @elprans in 6c2c4904)

Originalquelle(öffnet in neuem Tab)Problem melden

Asyncpg von MagicStack

Asyncpg 0.30.0: Python 3.13, PostgreSQL 17, GSSAPI und SSPI

Version 0.30.0 unterstützt Python 3.13 und PostgreSQL 17, ergänzt GSSAPI- und SSPI-Authentifizierung, erste Typisierungen, fetchmany, den sslnegotiation-Parameter, ein connect-Argument für Pool und anpassbares Zurücksetzen des Verbindungszustands sowie mehrere Fehlerbehebungen.

Support Python 3.13 and PostgreSQL 17.

Improvements

  • Implement GSSAPI authentication (by @eltoder in 1d4e5680 for #1122)

  • Implement SSPI authentication (by @eltoder in 1aab2094 for #1128)

  • Add initial typings (by @bryanforbes in d42432bf for #1127)

  • Allow building with Cython 3 (by @musicinmybrain in 258d8a95 for #1101)

  • docs: fix connection pool close call (#1125) (by @paulovitorweb in e8488149 for #1125)

  • Add support for the sslnegotiation parameter (by @elprans in afdb05c7 for #1187)

  • Test and build on Python 3.13 (by @elprans in 3aa98944 for #1188)

  • Support PostgreSQL 17 (by @elprans in cee97e1a for #1189) (by @MeggyCal in aa2d0e69 for #1185)

  • Add fetchmany to execute many and return rows (by @rossmacarthur in 73f2209d for #1175)

  • Add connect kwarg to Pool to better support GCP's CloudSQL (by @d1manson in 3ee19baa for #1170)

  • Allow customizing connection state reset (#1191) (by @elprans in f6ec755c for #1191)

Fixes

  • s/quote/quote_plus/ in the note about DSN part quoting (by @elprans in 1194a8a6 for #1151)

  • Use asyncio.run() instead of run_until_complete() (by @eltoder in 9fcddfc1 for #1140)

  • Require async_timeout for python < 3.11 (#1177) (by @Pliner in 327f2a7a for #1177)

  • Allow testing with uvloop on Python 3.12 (#1182) (by @musicinmybrain in 597fe541 for #1182)

  • Mark pool-wrapped connection coroutine methods as coroutines (by @elprans in 636420b1 for #1134) …

Originalquelle(öffnet in neuem Tab)Problem melden

Asyncpg von MagicStack

Asyncpg 0.29.0: Python 3.12 und PostgreSQL 16

Version 0.29.0 unterstützt Python 3.12 und PostgreSQL 16, bringt Tuple-Codecs für Composite-Typen, target_session_attrs in URLs, Infinity-Numerics, eine WHERE-Klausel für copy_to und Query-Logging-Callbacks sowie diverse Fehlerbehebungen.

Minor fixes and improvements.

Improvements

  • Python 3.12 and PostgreSQL 16 support (#1084) (by @elprans in deea86ce)

  • Add support for tuple-format custom codecs on composite types (#1061) (by @elprans in 922fcd10)

  • Support target_session_attrs in URL format, add tests (#1073) (by @elprans in 7cb4e70d)

  • Infinity numeric support (#1067) (by @krokoziabla in 0c3bf600 for #1020)

  • Add support for the WHERE clause in copy_to methods (#941) (by @kaylynn234 in b7ffab6c)

  • Add query logging callbacks and context manager (#1043) (by @dcwatson in b2697ffd)

Fixes

  • When prepared statements are disabled, avoid relying on them harder (#1065) (by @elprans in cbf64e18)

  • Handle environments with HOME set to a not-a-directory (#1063) (by @elprans in af922bcf)

  • Fix handling of non-ASCII passwords (#1062) (by @elprans in 89d5bd03)

  • Disable JIT while doing type introspection (#1082) (by @elprans in f21ebf64)

  • Remove connection parameter caching in Pool (#1053) (by @ermakov-oleg in 4ddb0397)

  • Switch to Python 3.12-style wait_for (#1086) (by @elprans in 4bdd8a7e)

  • Update automatic PostGIS type conversion for Shapely 2.0 (#1085) (by @ChimneySwift in 8b45beb4)

  • Use the timeout context manager in the connection path (#1087) (by @elprans in 313b2b2b)

  • Small fix for documentation on using SSL in Connection (#995) (by @ScottFred in ccc7baf9)

  • Use cleanup_ctx in pool usage doc (#878) (by @ir4y in 70c8bd81) …

Originalquelle(öffnet in neuem Tab)Problem melden

Asyncpg von MagicStack

Asyncpg 0.28.0

Version 0.28.0 ergänzt Pool.is_closing(), Unterstützung für target_session_attrs und READ UNCOMMITTED, behebt das Parsen von Salt und Iterationen bei SCRAM und behandelt Umgebungen ohne Home-Verzeichnis.

Minor fixes and improvements.

Changes

  • Do not try to cleanup statements (#981) (by @fvannee in d2e710fe for #981)

  • Add Pool.is_closing() method (#973) (by @singingwolfboy in 9cb2c1ce for #973)

  • Fix test_tls_version for LibreSSL (#974) (by @CyberTailor in 7df9812a for #974)

  • Handle environments without home dir (#1011) (by @LeonardBesson in 172b8f69 for #1011)

  • fix: salt and iterations parsing for scram (#1026) (by @trigonometr in 7443a9e7 for #1026)

  • Add support for target_session_attrs (#987) (by @JesseDeLoore in bf74e88b for #987)

  • Add support for READ UNCOMMITTED (#1039) (by @benwah in 2f20bae7 for #1039)

  • Update benchmarks, add psycopg3 (#1042) (by @elprans in 7d4fcf04 for #1042)

Originalquelle(öffnet in neuem Tab)Problem melden

Asyncpg von MagicStack

Asyncpg 0.27.0: Python 3.11 und PostgreSQL 15, Python 3.6 entfällt

Version 0.27.0 unterstützt Python 3.11 und PostgreSQL 15, bietet arm64-Wheels für Mac und Linux, nutzt in Record.__repr__ den exakten Typnamen und beendet die Unterstützung für Python 3.6.

Support Python 3.11 and PostgreSQL 15. This release also drops support for Python 3.6.

Changes

  • Add arm64 mac and linux wheels (by @ddelange in 7bd6c49f for #954)

  • Add Python 3.11 to the test matrix (by @elprans in 5f908e67 for #948)

  • Exclude .venv from flake8 (#958) (by @jparise in 40b16ea6 for #958)

  • Upgrade to flake8 5.0.4 (from 3.9.2) (#961) (by @jparise in 0e73fec2 for #961)

  • Show an example of a custom Record class (#960) (by @jparise in 84c99bfd for #960)

  • Use the exact type name in Record.repr (#959) (by @jparise in eccdf61a for #959)

  • Drop Python 3.6 support (#940) (by @bryanforbes in bb0cb39d for #940)

  • Test on Python 3.11 and PostgreSQL 15, fix workflow deprecations (#968) (by @elprans in eab7fdf2 for #968)

Originalquelle(öffnet in neuem Tab)Problem melden

Asyncpg von MagicStack

Asyncpg 0.26.0

Version 0.26.0 erlaubt awaitable Objekte in der Passwortfunktion, unterstützt direkte TLS-Verbindungen ohne STARTTLS, ergänzt record_class bei Pool.fetch und Pool.fetchrow und enthält weitere Fehlerbehebungen.

Changes

  • Add support to use awaitable object in password function. (#889) (by @kwarunek in fb3b6bf7 for #889)

  • Support direct TLS connections (i.e. no STARTTLS) (#923) (by @jackwotherspoon in f2a937d2 for #923)

Fixes

  • Fix invalid pyproject.toml (#900) (by @Rongronggg9 in eddb649c for #900)

  • Add record_class parameter Pool.fetch and Pool.fetchrow (#896) (by @baltitenger in 2519cf38 for #896)

  • Domain basetypes are introspected (#886) (#887) (by @QuantumTM in cca4a2d3 for #886)

  • Properly handle exceptions raised while handling server auth messages (#862) (by @elprans in bd192623 for #862)

Originalquelle(öffnet in neuem Tab)Problem melden

Asyncpg von MagicStack

Asyncpg 0.25.0

Version 0.25.0 bringt bessere SSL-Optionen in URIs, Pool-Methoden für Größenabfragen, einen angebbaren Statement-Namen in Connection.prepare(), Unterstützung für multirange-Typen und mehrere Fehlerbehebungen.

Changes

  • Improve SSL option compatibility in URIs (by @fantix in 383c711e for #827)

  • Add Pool methods to determine its min, max, current and idle size (by @elprans in 603e3868 for #849)

  • Make it possible to specify a statement name in Connection.prepare() (by @elprans in 03a3d18f for #846)

  • Implement support for multirange types (by @elprans in d64a44a1 for #851)

Fixes

  • Make sure timeout callbacks always get cleaned up (by @elprans in dad26913 for #831)

  • Update __all__ statements to a simpler form that is better supported by typecheckers (by @bschnurr in 0a3ae7f5 for #828)

  • Fix test_timetz_encoding on Python 3.10 (by @elprans in 3a90fef0)

  • Fix a bunch of ResourceWarnings in the test suite (by @elprans in 2f4fe539)

  • Fix SSLContext deprecation warnings (by @elprans in 4d39a052)

  • Fix the description of the database argument to connect() (by @elprans in a2a92374 for #847)

  • Fix parsing of IPv6 addresses in the connection URI (by @elprans in f900b737 for #845)

  • Improve diagnostics of invalid executemany() input (by @elprans in a8fc21e0 for #848)

Originalquelle(öffnet in neuem Tab)Problem melden

Asyncpg von MagicStack

Asyncpg 0.24.0: Python 3.10, Python 3.5 entfällt

Version 0.24.0 unterstützt Python 3.10 und beendet die Unterstützung für Python 3.5, ergänzt asynchrone Iterables für copy_records_to_table(), Coroutine-Listener, SSL-Parameter im DSN, copy_-Wrapper im Pool sowie issubset und issuperset für Range.

Changes

  • Drop support for Python 3.5 (#777) (by @and-semakin in da58cd26 for #777)

  • Add support for Python 3.10 (#795) (by @elprans in abf55699 for #795)

  • Add support for asynchronous iterables to copy_records_to_table() (#713) (by @elprans in 1d33ff62 for #713)

  • Add support for coroutine functions as listener callbacks (#802) (by @elprans in 41da093e for #802)

  • Add support for sslcert, sslkey and sslrootcert parameters to DSN (#768) (by @jdobes and @elprans in c674e86a for #768)

  • Add copy_ wrappers to Pool (#661) (by @elprans in a6b0f283 for #661)

  • Add issubset and issuperset methods to the Range type (#563) (by @kdorsel in de07d0ab for #563)

Fixes

  • Break connection internal circular reference (#774) (by @fantix in d08a9b8b for #774)

  • Make Server Version Extraction More Flexible (#778) (by @Natrinicle in d0761694 for #778)

Originalquelle(öffnet in neuem Tab)Problem melden

Asyncpg von MagicStack

Asyncpg 0.23.0

Version 0.23.0 enthält Fehlerbehebungen, darunter Unterstützung für sslmode=allow, readonly und deferrable bei nicht-serializable Transaktionen, einen Fix für Transaction.__repr__ und den Py_DEBUG-Modus.

Fixes

  • Avoid TypeError in Transaction.__repr__ (#703) (by @BeatButton in d6eea8ed for #703)

  • Feed memoryview to writelines() (#715) (by @fantix in 359a34c4 for #715)

  • Add sslmode=allow support and fix =prefer retry (#720) (by @fantix in 075114c1 for #720)

  • Loosen message test in test_invalid_input (#751) (by @musicinmybrain in bc4127f4 for #751)

  • Support readonly and deferrable for non-serializable transactions (#747) (by @pauldraper in 5cf4089a for #747)

  • Fix asyncpg with Py_DEBUG mode (#719) (by @shadchin in a113d908 for #719)

  • Fix docs/Makefile and docs/_static/theme_overrides.css missing from PyPI package (#708) (by @musicinmybrain in c3060680 for #708)

Originalquelle(öffnet in neuem Tab)Problem melden

Asyncpg von MagicStack

Asyncpg 0.22.0: schnelleres, atomares executemany()

Version 0.22.0 beschleunigt executemany() deutlich und macht es atomar, unterstützt Python 3.9, neue PostgreSQL-Typen, eigene Record-Klassen und bevorzugt standardmäßig SSL-Verbindungen; es ist die letzte Version mit Python-3.5-Unterstützung.

A new asyncpg release is here.

Notable additions include Python 3.9 support, support for recently added PostgreSQL types like jsonpath, and last but not least, vastly improved executemany() performance. Importantly, executemany() is also now atomic, which means that either all iterations succeed, or none at all, whereas previously partial results would have remained in place, unless executemany() was called in a transaction.

There is also the usual assortment of improvements and bugfixes, see the details below.

This is the last release of asyncpg that supports Python 3.5, which has reached EOL last September.

Improvements

  • Vastly speedup executemany by batching protocol messages (#295) (by @fantix in 690048db for #295)

  • Allow using custom Record class (by @elprans in db4f1a6c for #577)

  • Add Python 3.9 support (#610) (by @elprans in c05d7260 for #610)

  • Prefer SSL connections by default (#660) (by @elprans in 16183aa0 for #660)

  • Add codecs for a bunch of new builtin types (#665) (by @elprans in b53f0384 for #665)

  • Expose Pool as asyncpg.Pool (#669) (by @rugleb in 0e0eb8d3 for #669)

  • Avoid unnecessary overhead during connection reset (#648) (by @kitogo in ff5da5f9 for #648)

Fixes

  • Add a workaround for bpo-37658 (by @elprans in 2bac166c for #21894)

  • Fix wrong default transaction isolation level (#622) (by @fantix in 4a627d55 for #622) …

Originalquelle(öffnet in neuem Tab)Problem melden

Asyncpg von MagicStack

Asyncpg 0.21.0

Version 0.21.0 unterstützt Passwortfunktionen (etwa für RDS IAM Auth) und Listener für Verbindungsabbrüche, behebt eine mögliche Zugriffslücke auf nicht initialisierte Zeiger (CVE-2020-17446) und verbessert die Dokumentation.

Improvements

  • Add support for password functions (useful for RDS IAM auth) (#554) (by Harvey Frye in 1d9457f0 for #554)

  • Add support for connection termination listeners (#525) (by @iomintz in 8141b93c for #525)

  • Update CI matrix, aarch64 builds (#595) (by @Gelbpunkt in ac6a2fcf for #595)

Fixes

  • Fix possible uninitalized pointer access on unexpected array message data (CVE-2020-17446, by @elprans in 69bcdf5b, reported by @risicle)

  • Fix Connection class _copy_in private method (by @ABCDeath in 7f5c2a24 for #555)

  • Bump pgproto to fix compilation issues (by @elprans in aa67d61b for #565)

  • Improve pool documentation examples (#491) (by @nyurik in 745f8f81 for #491)

  • Update usage.rst (#572) (by @xuedong09 in f5b425ae for #572)

  • Fix links in connection documentation (#584) (by @samuelcolvin in b0813204 for #584)

  • Fix usage documentation for hstore (#515) (by @aaliddell in 39040b3c for #515)

  • Fix compiler warnings (by @elprans in 6cb5ba19)

Originalquelle(öffnet in neuem Tab)Problem melden

Asyncpg von MagicStack

Asyncpg 0.20.0

Version 0.20.0 unterstützt Python 3.8 und PgBouncer, beschleunigt UUID-Codecs um das 2- bis 7-Fache, nutzt loop.start_tls() für SSL-Upgrades und behebt Fehler bei inet-Werten und Verbindungs-Timeouts.

Improvements

  • Support Python 3.8 (by @1st1 in #504)

  • Support PgBouncer by sending only a single SYNC message per query (by @fvannee in b043fbd3)

Bug Fixes

  • Handle IP values with prefix in "inet" type as ipaddress.IPvXInterface (by @elprans in 5a4daf71 for #497)

  • Close transport if connection times out (by @hexrain in 926f4833 for #468)

  • Use faster UUID codecs; make UUID decoding/encoding/operations 2-7x faster (by @1st1 in edde3ff4)

  • Use loop.start_tls() to upgrade connections to SSL (by @1st1 in bdba7ce7)

Build

  • Bump Cython to 0.29.14 (by @1st1 in 7cb31bc6)

Originalquelle(öffnet in neuem Tab)Problem melden

Asyncpg von MagicStack

Asyncpg 0.19.0

Version 0.19.0 ergänzt SCRAM-SHA-256-Authentifizierung und PostgreSQL-12-Unterstützung und behebt mehrere Fehler, etwa ein Speicherleck im Statement-Cache und das Entquoten von Verbindungsstring-Komponenten.

Improvements

  • Add support for SCRAM-SHA-256 authentication. (by @jkatz in 2d76f50d)

  • Add PostgreSQL 12 support (by @elprans in 23261532)

Bug Fixes

  • Remove preexec_fn hack from test cluster management (by @elprans in 36ed11d2)

  • Fix DeprecationWarning in the docstring of copy_from_query() (by @elprans in 482a39ae)

  • Allow specifying the target version when generating the release log (by @elprans in 43a7b213)

  • Check for .flake8 after importing flake8 (by @dotlambda in aaeb7076)

  • Include .flake8 in PyPI tarball (by @dotlambda in 43c6b9ce)

  • fix timezone type label in docs (by @claws in e91e4911)

  • Fix _StatementCache.clear() PS memory leak (by @un-def in f4aa9bf4 for #416)

  • fix for warning_callback not yet defined (by @samuelcolvin in 354d9be5)

  • Fix assertion fail on copy_records_to_table (by Petr Reznikov in ae5a89db)

  • Do not look for a port in a Unix socket domain path (by @Lawouach in b773912d for #419)

  • Unquote connection string components properly (by @elprans in 5513b9d3 for #418)

  • Remove superfluous transaction from a cursor example (by @elprans in 32fccaad for #475)

Originalquelle(öffnet in neuem Tab)Problem melden

Asyncpg von MagicStack

Asyncpg 0.18.2

Version 0.18.2 macht eine Änderung zur ReadyForQuery-Behandlung rückgängig, um eine Stabilitätsregression zu beheben, ignoriert Nachrichten nach Terminate korrekt und räumt vom Server geschlossene Verbindungen richtig auf.

Bug Fixes

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

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

  • Properly cleanup connections closed by remote (by @elprans in 4393a159 for #385)

Originalquelle(öffnet in neuem Tab)Problem melden

Asyncpg von MagicStack

Asyncpg 0.18.0

Version 0.18.0 ergänzt unter anderem Record.get(), Mappings als Composite-Eingabe, mehrere Hostadressen beim Verbinden, sslmode in DSNs und BitString.to_int()/from_int() und behebt Fehler beim Lesen von .pgpass sowie bei Timestamps vor der Postgres-Epoche.

Improvements

  • Implement Record.get() (by @elprans in 2b93ee55 for #330)

  • Internal asyncpg errors are now consistently raised as InternalClientError (by @elprans in 263de3ff)

  • Allow mappings as composite type input (by @elprans in eaa2fa1a for #349)

  • Add BitString.to_int() and BitString.from_int() (by @percontation in ffd134e8)

  • Allow 'sslmode' in DSNs (by @percontation in 0304288e)

  • Add support for specifying multiple host addresses when connecting (by @elprans in 1d650ed9 for #257)

  • Low-level protocol implementation has been tweaked and optimized for slightly better performance in certain scenarios (by @elprans in 7a816138 and cc053fe5)

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

  • Allow aliasing builtin types by name in set_builtin_type_codec() (by @elprans in 687127ed)

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

  • Fix tests and enable CI for PostgreSQL 11 (by @elprans in ddb0ec29 and 716fd9d3)

Bug Fixes

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

  • Fix decoding of fractional timestamps before Postgres epoch (by @elprans in a7eaf2b3 for #363)

Originalquelle(öffnet in neuem Tab)Problem melden

Asyncpg von MagicStack

Asyncpg 0.17.0: offizielle Unterstützung für Python 3.7

Version 0.17.0 unterstützt Python 3.7 offiziell, gibt bei nicht geschlossenen Verbindungen eine ResourceWarning aus, quotet Kanalnamen in Listenern korrekt und behebt Fehler bei der BSD-Endianness-Erkennung und großen Typ-OIDs.

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 d9a236e7 for #323)

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

  • Channel names in Connection.add_listener() and Connection.remove_listener() are now quoted properly. (by @sqwishy in 3e6ade62)

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

  • Fixed handling of large type OIDs. (by @elprans in 2624bdb9 for #300)

Originalquelle(öffnet in neuem Tab)Problem melden

Asyncpg von MagicStack

Asyncpg 0.16.0: Pool.close() wartet auf freigegebene Verbindungen

Version 0.16.0 lässt Pool.close() warten, bis alle erworbenen Verbindungen freigegeben sind, und ergänzt Lesen von Passwörtern aus .pgpass, Connection.is_in_transaction(), Pool-Verbindungsrotation sowie weitere Verbesserungen und Fehlerbehebungen.

Behavior Changes

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

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 55a372fc for #267)

  • Add Connection.is_in_transaction() (#297) (by @bcaudell95 in cf523be7 for #297)

  • Added codec for built-in type tid (by @fantix in cddea9c1)

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

  • Allow passing datetime.date instances as timestamp input (by @elprans in e8cc627a for #288)

  • Implement support for pool connection rotation (by @elprans in 4d209b75 for #291)

Bug Fixes

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

  • Decode numeric zeros with correct scale (by Dmitriy Chugunov in 4124f7d2)

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

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

  • Fix type codec cache races (by @elprans in 482a1866 for #278)

  • Raise a consistent exception on input encoding errors (by @elprans in 0ddfa466 for #260)

Originalquelle(öffnet in neuem Tab)Problem melden

Asyncpg von MagicStack

Asyncpg 0.15.0

Version 0.15.0 nutzt für explizite Prepared Statements nicht mehr den gemeinsamen Statement-Cache, sodass Connection.prepare() stets ein neues Statement liefert, und behebt Fehler bei Codec-Initialisierung und Server-Versions-Parsing.

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 a19ce50f).

Bug Fixes

  • Initialize statement codecs immediately after Prepare (by @elprans in 803c1155 for #241)

  • Fix server version parsing when it contains trailing data (by @elprans in 05dce25f for #250)

Originalquelle(öffnet in neuem Tab)Problem melden