diff options
author | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2015-10-01 14:44:14 +0100 |
---|---|---|
committer | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2015-10-01 14:44:14 +0100 |
commit | 9e6c3322d8640bca7007a222973d87d8ea60057c (patch) | |
tree | ba0a744284d279cdf9012011fb7a8939e24db28e | |
parent | 98f2aad4baea7472a6643d6da7986e9b016a6f54 (diff) | |
download | psycopg2-9e6c3322d8640bca7007a222973d87d8ea60057c.tar.gz |
Fixed PersistentConnectionPool on Python 3
Fixes ticket #348.
-rw-r--r-- | NEWS | 5 | ||||
-rw-r--r-- | lib/pool.py | 4 |
2 files changed, 5 insertions, 4 deletions
@@ -20,8 +20,9 @@ What's new in psycopg 2.6.2 ^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Report the server response status on errors (such as :ticket:`#281`). -- Raise NotSupportedError on unhandled server response status +- Raise `!NotSupportedError` on unhandled server response status (:ticket:`#352`). +- Fixed `!PersistentConnectionPool` on Python 3 (:ticket:`#348`). What's new in psycopg 2.6.1 @@ -30,7 +31,7 @@ What's new in psycopg 2.6.1 - Lists consisting of only `None` are escaped correctly (:ticket:`#285`). - Fixed deadlock in multithread programs using OpenSSL (:ticket:`#290`). - Correctly unlock the connection after error in flush (:ticket:`#294`). -- Fixed ``MinTimeLoggingCursor.callproc()`` (:ticket:`#309`). +- Fixed `!MinTimeLoggingCursor.callproc()` (:ticket:`#309`). - Added support for MSVC 2015 compiler (:ticket:`#350`). diff --git a/lib/pool.py b/lib/pool.py index 4f858ab..8d7c4af 100644 --- a/lib/pool.py +++ b/lib/pool.py @@ -204,8 +204,8 @@ class PersistentConnectionPool(AbstractConnectionPool): # we we'll need the thread module, to determine thread ids, so we # import it here and copy it in an instance variable - import thread - self.__thread = thread + import thread as _thread # work around for 2to3 bug - see ticket #348 + self.__thread = _thread def getconn(self): """Generate thread id and return a connection.""" |