82
I Use This!
Moderate Activity

News

Analyzed about 12 hours ago. based on code collected about 12 hours ago.
Posted about 6 years ago by Daniele Varrazzo
Psycopg 2.8.4 has been released. The release brings a few assorted bugfixes and adds support for Python 3.8 and PostgreSQL 12. A more detailed changes list is Fixed building with Python 3.8 (ticket #854). Don't swallow keyboard interrupts on ... [More] connect when a password is specified in the connection string (ticket #898). Don't advance replication cursor when the message wasn't confirmed (ticket #940). Fixed inclusion of time.h on linux (ticket #951). Fixed int overflow for large values in Column.table_oid and Column.type_code (ticket #961). errorcodes map and errors classes updated to PostgreSQL 12. Wheel package compiled against OpenSSL 1.1.1d and PostgreSQL at least 11.4. [Less]
Posted over 6 years ago by Daniele Varrazzo
We have released Psycopg 2.8.3, which includes a slight change to the logical replication. Choosing the right frequency to send replication feedback messages from the client to the server was previously the developer's responsibility, with too many ... [More] feedback messages being a waste of bandwidth and server resources, too few slowing down WAL cleanup and possibly preventing a server graceful shutdown. Psycopg will now make sure that feedback is only sent after a certain period of time from the previous one, so that the client can simply call send_feedback() at each message without the fear of overwhelming the server. Further details are available in the MR by Alexander Kukushkin and Oleksandr Shulgin. Thank you very much! For completeness, the changes included in the release are: Added interval_status parameter to start_replication() method and other facilities to send automatic replication keepalives at periodic intervals (ticket #913). Fixed namedtuples caching introduced in 2.8 (ticket #928). [Less]
Posted over 6 years ago by Daniele Varrazzo
Hello, We have just released Psycopg 2.8.2; a few days ago Psycopg 2.8.1 was released. Some of the bugs addressed are ordinary teething problem with the 2.8 release, but an important change landed with 2.8.2: binary packages now ship with OpenSSL 1.1 ... [More] instead of 1.0. This should fix concurrency problems on connection experienced both on Windows and Linux. Many thanks to Matthew Brett and Jason Erickson for this improvement! The combined list of changes is: Fixed "there's no async cursor" error polling a connection with no cursor (ticket #887). Fixed RealDictCursor when there are repeated columns (ticket #884). Fixed RealDictRow modifiability (ticket #886). Binary packages built with OpenSSL 1.1.1b. Should fix concurrency problems (ticket #543, ticket #836). Happy hacking! [Less]
Posted over 6 years ago by Daniele Varrazzo
After about two years from the previous major release, psycopg 2.8 is finally here! Among the highlights, PostgreSQL errors are now mapped to Python exceptions for a more idiomatic way to handle them. Several additions allow a better insight of the ... [More] connection status and query results. Behind the scene, asynchronous communication and concurrency received several improvements, and dropping support for older versions of Python gave the chance to refactor and modernise the codebase (with the especial help from Jon Dufresne who ruthlessly butchered our code into a streamlined pulp). Thank you very much to everyone contributing so far. Happy hacking! You can download as usual from the canonical urls: source package signature Or just use pip: pip install psycopg2 New features: Added errors module. Every PostgreSQL error is converted into a specific exception class (ticket #682). Added encrypt_password() function (ticket #576). Added BYTES adapter to manage databases with mixed encodings on Python 3 (ticket #835). Added table_oid and table_column attributes on cursor.description items (ticket #661). Added connection.info object to retrieve various PostgreSQL connection information (ticket #726). Added get_native_connection() to expose the raw PGconn structure to C extensions via Capsule (ticket #782). Added pgconn_ptr and pgresult_ptr to expose raw C structures to Python and interact with libpq via ctypes (ticket #782). sql.Identifier can represent qualified names in SQL composition (ticket #732). Added ReplicationCursor.wal_end attribute (ticket #800). Added fetch parameter to execute_values() function (ticket #813). str() on Range produces a human-readable representation (ticket #773). DictCursor and RealDictCursor rows maintain columns order (ticket #177). Added severity_nonlocalized attribute on the Diagnostics object (ticket #783). More efficient NamedTupleCursor (ticket #838). Bug fixes: Fixed connections occasionally broken by the unrelated use of the multiprocessing module (ticket #829). Fixed async communication blocking if results are returned in different chunks, e.g. with notices interspersed to the results (ticket #856). Fixed adaptation of numeric subclasses such as IntEnum (ticket #591). Other changes: Dropped support for Python 2.6, 3.2, 3.3. Dropped psycopg1 module. Dropped deprecated register_tstz_w_secs() (was previously a no-op). Dropped deprecated PersistentConnectionPool. This pool class was mostly designed to interact with Zope. Use ZPsycopgDA.pool instead. Binary packages no longer installed by default. The psycopg2-binary package must be used explicitly. Dropped PSYCOPG_DISPLAY_SIZE build parameter. Dropped support for mxDateTime as the default date and time adapter. mxDatetime support continues to be available as an alternative to Python's builtin datetime. No longer use 2to3 during installation for Python 2 & 3 compatibility. All source files are now compatible with Python 2 & 3 as is. The psycopg2.test package is no longer installed by python setup.py install. Wheel package compiled against OpenSSL 1.0.2r and PostgreSQL 11.2 libpq. [Less]
Posted about 7 years ago by Daniele Varrazzo
We have just released psycopg 2.7.6 package, fixing the issues found in the last months in the psycopg 2.7 version. Summary of changes: Close named cursors if exist, even if execute() wasn't called (ticket #746). Fixed building on modern FreeBSD ... [More] versions with Python 3.7 (ticket #755). Fixed hang trying to COPY via execute() in asynchronous connections (ticket #781). Fixed adaptation of arrays of empty arrays (ticket #788). Fixed segfault accessing the connection.readonly and connection.deferrable attributes repeatedly (ticket #790). execute_values() accepts sql.Composable objects (ticket #794). errorcodes map updated to PostgreSQL 11. Wheel package compiled against PostgreSQL 10.5 libpq and OpenSSL 1.0.2p. You can install psycopg2 from PyPI or grab the new code from: source package signature Happy hacking! [Less]
Posted over 7 years ago by Daniele Varrazzo
psycopg2 version 2.7.5 has been released, fixing a few bugs found in the last months: Summary of changes: Allow non-ascii chars in namedtuple fields (regression introduced fixing ticket #211). Fixed adaptation of arrays of arrays of nulls (ticket ... [More] #325). Fixed building on Solaris 11 and derivatives such as SmartOS and illumos (ticket #677). Maybe fixed building on MSYS2 (as reported in ticket #658). Allow string subclasses in connection and other places (ticket #679). Don't raise an exception closing an unused named cursor (ticket #716). Wheel package compiled against PostgreSQL 10.4 libpq and OpenSSL 1.0.2o. You can install psycopg2 from PyPI or grab the new code from: source package signature Happy hacking! [Less]
Posted almost 8 years ago by Daniele Varrazzo
We have released Psycopg version 2.7.4, bringing a few bug fixes... and working out the problem with Wheel packages. What's the problem with Wheels? Wheel packages are a Python standard to distribute self-contained binary package. They are ... [More] especially convenient for packages containing C extensions, such as Psycopg, and for packages depending on external C libraries... such as Psycopg, because the package will contain a binary, pre-compiled, version of the C extension and all the depending libraries (excluding a list of libraries expected to be found on any system and with a versioned ABI, such as libc). Since the release of the wheel packages with psycopg 2.7 it has been possible to install Psycopg without the prerequisites of a C compiler and of Python/Postgres dev packages at build time, and the need of a system libpq at runtime. Unfortunately, after the packages were released, it was reported of occasional segfaults of Python processes using Psycopg from the Wheel package. This was traced to the use of the Python ssl library concurrently with Psycopg opening connections, for instance in a multithread program opening concurrently https resources and database connections. The problem seems caused by a non-reentrant OpenSSL initialization function (unfortunately invoked by libpq at every connection) and the fact that the Python process ends up binding two different versions of the libssl library: the system one via the Python ssl library (e.g. imported by urllib or requests) and the Wheel one imported by the libpq, in turn imported by psycopg2. While the problem doesn't affect many users, a library behaving unreliably in combination with part of the stdlib is a situation less than optimal. The workaround is to force installing Psycopg from source, but this must be specified explicitly in the project dependencies (e.g. using the --no-binary flag in the pip command line or in the requirements.txt file); the Python packaging system doesn't really have a way to declare something like "install a package preferably from source"... so we had to create one ourselves. Starting with Psycopg 2.7.4, we are releasing two different packages on PyPI: psycopg2 and psycopg2-binary. The latter is a Wheels-only package, with a behaviour identical to the classic one – the different name is used only in installation (it is installed by pip install psycopg2-binary, but still imported with import psycopg2 in Python). For the lifespan of the Psycopg 2.7 cycle, the psycopg2 PyPI package will still contain wheel packages, but starting from Psycopg 2.8 it will become again a source-only package. Starting from Psycopg 2.7.4, if the package is installed as binary from the psycopg2 PyPI entry, a warning will be reported on import: The psycopg2 wheel package will be renamed from release 2.8; in order to keep installing from binary please use "pip install psycopg2-binary" instead. For details see: <http://initd.org/psycopg/docs/install.html#binary-install-from-pypi>. The choices for the users are then two: if the program works fine with the Wheel packages, and the convenience of the binary distribution is preferred, it is possible to specify the dependency on the binary package using the psycopg2-binary instead of the psycopg2 PyPI package. No change to the program code is needed; if there are concerns about the unreliability of the Wheels package, it is adviced to force installation from source. This requires the presence of build tools and runtime libraries on the client, but again it requires no change to the code. We hope this solution will suggest the default use of a reliable version of the library, while still allowing the convenience of a dependencies-free package. Feedback is welcome on the mailing list. Other changes in this version Convert fields names into valid Python identifiers in NamedTupleCursor (ticket #211). Fixed Solaris 10 support (ticket #532). cursor.mogrify() can be called on closed cursors (ticket #579). Fixed setting session characteristics in corner cases on autocommit connections (ticket #580). Fixed MinTimeLoggingCursor on Python 3 (ticket #609). Fixed parsing of array of points as floats (ticket #613). Fixed __libpq_version__ building with libpq >= 10.1 (ticket 632). Fixed rowcount after executemany() with RETURNING statements (ticket 633). Fixed compatibility problem with pypy3 (ticket #649). Wheel packages compiled against PostgreSQL 10.1 libpq and OpenSSL 1.0.2n. Wheel packages for Python 2.6 no more available (support dropped from wheel building infrastructure). [Less]
Posted about 8 years ago by Daniele Varrazzo
Following the release of PostgreSQL 10 we have released new binary packages as Psycopg 2.7.3.2. There are no code changes from Psycopg 2.7.3, but the new binary packages ship with the PostgreSQL 10 client library, enabling the use of new features ... [More] such as multiple hosts in connection string, read-only mode, SCRAM-SHA-256 authentication. The packages are already available on PyPI and automatically installed by pip install psycopg2 (if your pip is up-to-date). You can grab the source code from: source package signature Happy hacking! [Less]
Posted about 8 years ago by Daniele Varrazzo
Releasing psycopg2 version 2.7.2: a release fixing a host of bugs found in the last 3-4 months. Summary of changes: Fixed inconsistent state in externally closed connections (ticket #263, ticket #311, ticket #443). Was fixed in 2.6.2 but not ... [More] included in 2.7 by mistake. Fixed Python exceptions propagation in green callback (ticket #410). Don't display the password in connection.dsn when the connection string is specified as an URI (ticket #528). Return objects with timezone parsing "infinity" timestamptz (ticket #536). Dropped dependency on VC9 runtime on Windows binary packages (ticket #541). Fixed segfault in lobject() when mode=None (ticket #544). Fixed lobject() keyword argument lobject_factory (ticket #545). Fixed ReplicationCursor.consume_stream() keepalive_interval argument (ticket #547). Maybe fixed random import error on Python 3.6 in multiprocess environment (ticket #550). Fixed random SystemError upon receiving abort signal (ticket #551). Accept sql.Composable objects in ReplicationCursor.start_replication_expert() (ticket 554). Parse intervals returned as microseconds from Redshift (ticket #558). Added Json.prepare() method to consider connection params when adapting (ticket #562). errorcodes map updated to PostgreSQL 10 beta 1. You can install psycopg2 from PyPI or grab the new code from: source package signature Happy hacking! [Less]
Posted about 8 years ago by Daniele Varrazzo
A quick release to fix a regression found in psycopg 2.7.2: Restored default timestamptz[] typecasting to Python datetime. Regression introduced in Psycopg 2.7.2 (ticket #578). You can install psycopg2 from PyPI or grab the new code from: source package signature Happy hacking!