Zum Inhalt springen

Psycopg Release Notes

Einträge
56
Quellen
2

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

Psycopg

Psycopg 2.5.1: Kompatibilitäts- und Stabilitätsfixes

Psycopg 2.5.1 behebt Build-Probleme auf Solaris, verbessert den Vergleich von Range-Objekten und behebt einen double-free bei der Verbindungsfreigabe.

  • Fixed build on Solaris 10 and 11 where the round() function is already declared (ticket #146).

  • Fixed comparison of Range with non-range objects (ticket #164). Thanks to Chris Withers for the patch.

  • Fixed double-free on connection dealloc (ticket #166). Thanks to Gangadharan S.A. for the report and fix suggestion.

Originalquelle(öffnet in neuem Tab)Problem melden

Psycopg

Psycopg 2.5: Neue Funktionen und Verbesserungen

Psycopg 2.5 fügt JSON-Adaption, Unterstützung für PostgreSQL-Range-Typen, Kontextmanager für Verbindungen und Cursor, Diagnostics-Objekt, konfigurierbare Cursor-Fabrik und scrollbare Cursor hinzu.

New features:

  • Added JSON adaptation.

  • Added support for PostgreSQL 9.2 range types.

  • connection and cursor objects can be used in with statements as context managers as specified by recent DB API 2.0 extension.

  • Added Diagnostics object to get extended info from a database error. Many thanks to Matthew Woodcraft for the implementation (ticket #149).

  • Added connection.cursor_factory attribute to customize the default object returned by cursor().

  • Added support for backward scrollable cursors. Thanks to Jon Nelson for the initial patch (ticket #108).

  • Added a simple way to customize casting of composite types into Python objects other than namedtuples. Many thanks to Ronan Dunklau and Tobias Oberstein for the feature development.

  • connection.reset() implemented using DISCARD ALL on server versions supporting it.

Bug fixes: …

Originalquelle(öffnet in neuem Tab)Problem melden

Psycopg

Psycopg 2.4.6: Fehlerbehebungen und Verbesserungen

Psycopg 2.4.6 behebt Probleme mit cursor()-Argumenten, GIL-Freigabe, green connections, register_hstore/composite, Zope-Pool und connect()-Fehlern, und verwirft Ergebnisse von executemany().

  • Fixed ‘cursor()’ arguments propagation in connection subclasses and overriding of the ‘cursor_factory’ argument. Thanks to Corry Haines for the report and the initial patch (ticket #105).

  • Dropped GIL release during string adaptation around a function call invoking a Python API function, which could cause interpreter crash. Thanks to Manu Cupcic for the report (ticket #110).

  • Close a green connection if there is an error in the callback. Maybe a harsh solution but it leaves the program responsive (ticket #113).

  • ‘register_hstore()’, ‘register_composite()’, ‘tpc_recover()’ work with RealDictConnection and Cursor (ticket #114).

  • Fixed broken pool for Zope and connections re-init across ZSQL methods in the same request (tickets #123, #125, #142).

  • connect() raises an exception instead of swallowing keyword arguments when a connection string is specified as well (ticket #131).

  • Discard any result produced by ‘executemany()’ (ticket #133). …

Originalquelle(öffnet in neuem Tab)Problem melden

Psycopg

Psycopg 2.4.5: Stabilitäts- und Kompatibilitätsfixes

Psycopg 2.4.5 macht close() idempotent, behebt fetchmany()-Probleme, nutzt lo_creat() für pgpool-II, macht Fehler picklable, verbessert Zeitzonen-Formatierung und behebt einen commit()-Konkurrenzfehler.

  • The close() methods on connections and cursors don’t raise exceptions if called on already closed objects.

  • Fixed fetchmany() with no argument in cursor subclasses (ticket #84).

  • Use lo_creat() instead of lo_create() when possible for better interaction with pgpool-II (ticket #88).

  • Error and its subclasses are picklable, useful for multiprocessing interaction (ticket #90).

  • Better efficiency and formatting of timezone offset objects thanks to Menno Smits (tickets #94, #95).

  • Fixed ‘rownumber’ during iteration on cursor subclasses. Regression introduced in 2.4.4 (ticket #100).

  • Added support for ‘inet’ arrays.

  • Fixed ‘commit()’ concurrency problem (ticket #103).

  • Codebase cleaned up using the GCC Python plugin’s static analysis tool, which has revealed several unchecked return values, possible NULL dereferences, reference counting problems. Many thanks to David Malcolm for the useful tool and the assistance provided using it.

Originalquelle(öffnet in neuem Tab)Problem melden

Psycopg

Psycopg 2.4.4: Fehlerbehebungen und Verbesserungen

Psycopg 2.4.4 erweitert register_composite() auf implizite Typen, stellt Isolationswerte wieder her, behebt itersize bei DictCursor, Zope-Rollback und wirft DatabaseError bei leeren libpq-Fehlern.

  • ‘register_composite()’ also works with the types implicitly defined after a table row, not only with the ones created by ‘CREATE TYPE’.

  • Values for the isolation level symbolic constants restored to what they were before release 2.4.2 to avoid breaking apps using the values instead of the constants.

  • Named DictCursor/RealDictCursor honour itersize (ticket #80).

  • Fixed rollback on error on Zope (ticket #73).

  • Raise ‘DatabaseError’ instead of ‘Error’ with empty libpq errors, consistently with other disconnection-related errors: regression introduced in release 2.4.1 (ticket #82).

Originalquelle(öffnet in neuem Tab)Problem melden

Psycopg

Psycopg 2.4.3: Neue Funktionen und Fehlerbehebungen

Psycopg 2.4.3 unterstützt alle Schlüsselwortargumente der Datenbank in connect(), fügt new_array_type() hinzu, behebt einen Segfault bei verlorener Verbindung und verbessert die Datenbankanpassung und -behandlung.

  • 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). …

Originalquelle(öffnet in neuem Tab)Problem melden

Psycopg

Psycopg 2.4.2: Sitzungs- und Autocommit-Unterstützung

Psycopg 2.4.2 fügt set_session() und autocommit hinzu, unterstützt schreibgeschützte Sitzungen und behebt einen Multithread-Synchronisationsfehler sowie weitere Fehler.

  • 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!

Originalquelle(öffnet in neuem Tab)Problem melden

Psycopg

Psycopg 2.4.1: Eigener Bytea-Parser und Korrekturen

Psycopg 2.4.1 verwendet einen eigenen Parser für bytea, erkennt leere Abfragen korrekt und behebt Fehler mit benannten Cursorn und der libpq-Erkennung.

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

Originalquelle(öffnet in neuem Tab)Problem melden

Psycopg

Psycopg 2.4: Python-3-Unterstützung und neue Funktionen

Psycopg 2.4 unterstützt Python 3.1/3.2, verbessert benannte Cursor und Datentyp-Behandlung, fügt register_composite() hinzu und erweitert die Kodierungsunterstützung.

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. …

Originalquelle(öffnet in neuem Tab)Problem melden

Psycopg

Psycopg 2.3.2: Segfault behoben

Psycopg 2.3.2 behebt einen Segfault, der durch Middleware verursacht wurde, die den DateStyle nicht an den Client weitergibt.

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

Originalquelle(öffnet in neuem Tab)Problem melden

Psycopg

Psycopg 2.3: Neue Funktionen für PostgreSQL 9.0

Psycopg 2.3 bietet hstore-Adapter, Zwei-Phasen-Commit, Payload in Benachrichtigungen, namedtuple-Cursor und Abfrageabbruch, entfernt aber die Unterstützung für Protokoll 2.

psycopg 2.3 aims to expose some new features introduced in PostgreSQL 9.0.

Main new features:

  • dict to hstore adapter and hstore to dict typecaster, using both 9.0 and pre-9.0 syntax.

  • Two-phase commit protocol support as per DBAPI specification.

  • Support for payload in notifications received from the backend.

  • namedtuple-returning cursor.

  • Query execution cancel.

Other features and changes:

  • Dropped support for protocol 2: Psycopg 2.3 can only connect to PostgreSQL servers with version at least 7.4.

  • Don’t issue a query at every connection to detect the client encoding and to set the datestyle to ISO if it is already compatible with what expected.

  • mogrify() now supports unicode queries.

  • Subclasses of a type that can be adapted are adapted as the superclass.

  • errorcodes knows a couple of new codes introduced in PostgreSQL 9.0.

  • Dropped deprecated Psycopg “own quoting”.

  • Never issue a ROLLBACK on close/GC. This behaviour was introduced as a bug in release 2.2, but trying to send a command while being destroyed has been considered not safe.

Bug fixes:

  • Fixed use of PQfreemem instead of free in binary typecaster.

  • Fixed access to freed memory in conn_get_isolation_level(). …

Originalquelle(öffnet in neuem Tab)Problem melden

Psycopg

Psycopg 2.2.2: Fehlerbehebungen für Logging und Zeitzonen

Psycopg 2.2.2 entfernt einen logging.basicConfig-Aufruf aus pool.py, korrigiert Zeitzonen mit Sekunden im UTC-Offset und verbessert die Ausnahmebehandlung.

Bux fixes:

  • the call to logging.basicConfig() in pool.py has been dropped: it was messing with some projects using logging (and a library should not initialize the logging system anyway.)

  • psycopg now correctly handles time zones with seconds in the UTC offset. The old register_tstz_w_secs() function is deprecated and will raise a warning if called.

  • Exceptions raised by the column iterator are propagated.

  • Exceptions raised by executemany() iterators are propagated.

Originalquelle(öffnet in neuem Tab)Problem melden

Psycopg

Psycopg 2.2: Asynchrone Abfragen und neue Funktionen

Psycopg 2.2 unterstützt sowohl klassische select()-Schleifen als auch grüne Koroutinen, fügt truncate() für lobjects hinzu und verbessert Zeit- und Benachrichtigungsbehandlung.

This is the first release of the new 2.2 series, supporting not just one but two different ways of executing asynchronous queries, thanks to Jan and Daniele (with a little help from me and others, but they did 99% of the work so they deserve their names here in the news.)

psycopg now supports both classic select() loops and “green” coroutine libraries. It is all in the documentation, so just point your browser to doc/html/advanced.html.

Other new features:

  • truncate() method for lobjects.

  • COPY functions are now a little bit faster.

  • All builtin PostgreSQL to Python typecasters are now available from the psycopg2.extensions module.

  • Notifications from the backend are now available right after the execute() call (before client code needed to call isbusy() to ensure NOTIFY reception.)

  • Better timezone support.

  • Lots of documentation updates.

Bug fixes:

  • Fixed some gc/refcounting problems.

  • Fixed reference leak in NOTIFY reception.

  • Fixed problem with PostgreSQL not casting string literals to the correct types in some situations: psycopg now add an explicit cast to dates, times and bytea representations.

  • Fixed TimestampFromTicks() and TimeFromTicks() for seconds >= 59.5.

  • Fixed spurious exception raised when calling C typecasters from Python ones.

Originalquelle(öffnet in neuem Tab)Problem melden

Psycopg

Psycopg 2.0.14: Neuerungen

Die Unterstützung zur Anpassung von Tupeln an PostgreSQL-Arrays ist nun standardmäßig aktiviert, und die Fehlermeldung „can't adapt“ enthält jetzt vollständige Typinformationen.

New features:

  • Support for adapting tuples to PostgreSQL arrays is now enabled by default and does not require importing psycopg2.extensions anymore.

  • “can’t adapt” error message now includes full type information.

  • Thank to Daniele Varrazzo (piro) psycopg2’s source package now i

Originalquelle(öffnet in neuem Tab)Problem melden