Fixed connections re-init across ZSQL methods

Fixes issue #142, probably #123 and #125 too.
This commit is contained in:
Daniele Varrazzo 2012-12-03 16:49:55 +00:00
parent 27cd6c4880
commit bb72f121fb
2 changed files with 5 additions and 4 deletions

3
NEWS
View File

@ -27,7 +27,8 @@ What's new in psycopg 2.4.6
(ticket #113).
- 'register_hstore()', 'register_composite()', 'tpc_recover()' work with
RealDictConnection and Cursor (ticket #114).
- Fixed broken pool for Zope (tickets #123, #125).
- 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).

View File

@ -71,7 +71,7 @@ class DB(TM, dbi_db.DB):
pool.putconn(self.dsn, conn, close)
def getcursor(self):
conn = self.getconn()
conn = self.getconn(False)
return conn.cursor()
def _finish(self, *ignored):