Articles tagged news
Psycopg 2.4.5 released
Posted by Daniele Varrazzo
on March 29, 2012
Tagged as
news,
release
Many thanks to everybody that contributed with bug reports and comments to this release!
What's new in psycopg 2.4.5
- 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.
Psycopg 2.4.4 released
Posted by Daniele Varrazzo
on December 19, 2011
Tagged as
news,
release
After a short discussion on this list we decided to change the definitions of isolation levels to make sure old code using numeric constants (both psycopg1 and psycopg2) continue to works. Other small fixes are included in the release: see below for details.
What's new in psycopg 2.4.4
- 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).
Psycopg 2.4.3 released
Posted by Daniele Varrazzo
on December 12, 2011
Tagged as
news,
release
Mostly a bugfix release, with as usual a couple of small feature added:
Here is what's new in this release:
- 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).
- Fixed typecasting of arrays containing consecutive backslashes.
- errorcodes map updated to PostgreSQL 9.1.
Psycopg 2.4.2 released
Posted by Daniele Varrazzo
on June 12, 2011
Tagged as
news,
release
Psycopg 2.4.2 has been released: it brings a few small but interesting new features, and a lot of bug fixes.
Transaction control has been overhauled: a new connection method set_session() allows setting all the session properties affecting the transactions behaviour: the isolation level but it can also be used to have auto-commit, read-only, and deferrable transactions. You can use for example:
conn.set_session('read committed')
conn.set_session(readonly=True, autocommit=True)
conn.set_session('serializable',
readonly=True, deferrable=True)
There is also a welcome improvement for all the users thinking that
conn.set_isolation_level(
psycopg2.extensions.ISOLATION_LEVEL_AUTOCOMMIT)
was an excessively verbose syntax: a new read/write property allows to set
conn.autocommit = True
a much handier syntax for an often used connection property.
The improvements to the transactions control are not only at interface level: Psycopg doesn't require any more setup queries when connecting to a database. A sequence of statements:
import psycopg2
conn = psycopg2.connect('')
curs = conn.cursor()
curs.execute('SELECT 1')
curs.execute('SELECT 2')
conn.commit()
in older versions of the library would have resulted in the following commands sent to the backend:
SHOW default_transaction_isolation SET DATESTYLE TO 'ISO' SHOW client_encoding BEGIN; SET TRANSACTION ISOLATION LEVEL READ COMMITTED SELECT 1 SELECT 2 COMMIT
In Psycopg 2.4.2 the only commands sent are instead the essential:
BEGIN SELECT 1 SELECT 2 COMMIT
with the BEGIN/COMMIT obviously omitted in autocommit mode (the datestyle and encoding statements were already dropped in 2.3).
The new release also brings a lot of bug fixes, so we encourage updating soon, particularly if you use Psycopg in multithread programs:
- 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): a fix for the "ghost mx.DateTime" issue reported in virtualenv.
- Fixed escape for negative numbers prefixed by minus operator (ticket #57).
- Fixed GC race condition during copy in multithread programs, potentially resulting in refcount errors. 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 Windows. Report and fix, plus some long needed setup.py cleanup by Steve Lacy: thanks!
Psycopg 2.4.1 released
Posted by Federico Di Gregorio
on May 11, 2011
Tagged as
news,
release
Hi *,
Daniele stacked another round of fixes on the devel branch, so it is time for another release. So, as always, kudos to Daniele and here are the direct download links:
Release notes attached, as always. And al always, have fun,
federico
Psycopg 2.4 released
Posted by Federico Di Gregorio
on February 27, 2011
Tagged as
news,
release
Hi *,
this is probably one of the best psycopg releases ever. Daniele, Jason and all the others that sent patches did an impressive work to have psycopg build and work flawlessy on all the supported platforms (well.. we can probably do a little bit better on MacOS but everything else is almost perfect). So here it is (followed by NEWS excerpt, as always):
Psycopg 2.4 beta1 released
Posted by Federico Di Gregorio
on February 6, 2011
Tagged as
news,
release
Hi *,
me and Daniele, we just went through his series of patches (a loooot of patches) and we're ready to release a beta version of the new psycopg. Apart the usual changes and enhancements (detailed below) this is the first version that supports Python 3 (thanks to, guess who? :)
New Psycopg Mailing List Online!
Posted by Daniele Varrazzo
on January 8, 2011
Tagged as
mailing list,
news
After a long while Psycopg has a Mailing List again!
You are welcome to subscribe, either if you are an user dealing with the first stumbling blocks (albeit a look at the documentation or the FAQ wouldn't hurt!) or if you want to contribute to the psycopg2 development, about which there are several upcoming news.
To post, send mail to <psycopg@postgresql.org>. Yes, we are proud to be hosted on the mighty shoulders of the PostgreSQL Infrastructure team. I want to thank them and the PostgreSQL Global Development Group wholeheartedly for making this happen.
See you there!
Psycopg 2.3.2 released
Posted by Daniele Varrazzo
on December 20, 2010
Tagged as
news,
release
Hello,
just released Psycopg 2.3.2. The release fixes a bug reported in 2.3.0 and 2.3.1 preventing Psycopg to connect to pgBouncer. Thanks to Marti Raudsepp for the bug report and the patch.
Psycopg 2.3.1 released
Posted by Daniele Varrazzo
on December 4, 2010
Tagged as
news,
release
Hello,
just released Psycopg 2.3.1. No new feature since release 2.3.0: the only fix is for a build issue on CentOS 5.5 x86_64 (ticket #23).