kennethreitz/django-postgrespool — pull request #13 by Jonty (2013-07-02 18:47:28+00:00)
Title: Correctly invalidate connections on failure.

_cursor does not check if the connection is still valid, meaning that
once a connection has been marked as invalid it will attempt to get an
sqlalchemy cursor on a broken connection and throw an exception. This
commit causes the connection to be validated when using the cursor,
triggering a new connection to be fetched from the pool if the previous
one has been marked as dead.