]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
- New features added to support engine/pool plugins with advanced
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 30 Apr 2015 21:51:14 +0000 (17:51 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 30 Apr 2015 21:51:14 +0000 (17:51 -0400)
commit0e98795ff2c7a164b4da164d7b26af3faabf84d1
tree7448ed6552fb73068a105d4e6a1a2d485e24051d
parent20e3df602846bb1d8940b5138f21ef203c99bade
- New features added to support engine/pool plugins with advanced
functionality.   Added a new "soft invalidate" feature to the
connection pool at the level of the checked out connection wrapper
as well as the :class:`._ConnectionRecord`.  This works similarly
to a modern pool invalidation in that connections aren't actively
closed, but are recycled only on next checkout; this is essentially
a per-connection version of that feature.  A new event
:class:`.PoolEvents.soft_invalidate` is added to complement it.
fixes #3379

- Added new flag
:attr:`.ExceptionContext.invalidate_pool_on_disconnect`.
Allows an error handler within :meth:`.ConnectionEvents.handle_error`
to maintain a "disconnect" condition, but to handle calling invalidate
on individual connections in a specific manner within the event.

- Added new event :class:`.DialectEvents.do_connect`, which allows
interception / replacement of when the :meth:`.Dialect.connect`
hook is called to create a DBAPI connection.  Also added
dialect plugin hooks :meth:`.Dialect.get_dialect_cls` and
:meth:`.Dialect.engine_created` which allow external plugins to
add events to existing dialects using entry points.
fixes #3355
doc/build/changelog/changelog_10.rst
lib/sqlalchemy/engine/base.py
lib/sqlalchemy/engine/interfaces.py
lib/sqlalchemy/engine/strategies.py
lib/sqlalchemy/events.py
lib/sqlalchemy/pool.py
test/engine/test_execute.py
test/engine/test_parseconnect.py
test/engine/test_pool.py