diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-08-01 20:25:56 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-08-01 20:25:56 -0400 |
| commit | d2a6238372bf8050b847f5755817b5a1a16fcf10 (patch) | |
| tree | 2c553153d16052824e7de21c513ce68f56d7679f /lib/sqlalchemy/pool.py | |
| parent | 25839c064d995b3664f0cef01768961ac5e4807f (diff) | |
| download | sqlalchemy-d2a6238372bf8050b847f5755817b5a1a16fcf10.tar.gz | |
- assorted fixes raised by pypy 2.1beta2, but all of which are good
ideas in general:
- pypy2.1 w/ sqlite3 is the first DBAPI we're seeing returning
unicode in cursor.description without being py3k. add a new on-connect
check for this, if we get back a u"", just don't do description decoding,
should be OK for now.
- the set tests in test_collection were assuming the two sets would be ordered
the same when it tested pop(), can't really assume that.
- test_serializer gets worse and worse, pickle is just not really viable here,
ding out pypy
- pypy2.1b2 seems to allow cursor.lastrowid to work (or we changed something?)
- pool._threadconns.current() is a weakref, it can be None
- another one of those logging.handlers imports
Diffstat (limited to 'lib/sqlalchemy/pool.py')
| -rw-r--r-- | lib/sqlalchemy/pool.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/sqlalchemy/pool.py b/lib/sqlalchemy/pool.py index 498b001c1..f2d6ca6ea 100644 --- a/lib/sqlalchemy/pool.py +++ b/lib/sqlalchemy/pool.py @@ -277,7 +277,8 @@ class Pool(log.Identified): except AttributeError: pass else: - return rec.checkout_existing() + if rec is not None: + return rec.checkout_existing() return _ConnectionFairy.checkout(self, self._threadconns) |
