diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2019-10-05 21:28:48 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2019-10-06 19:17:35 -0400 |
| commit | 08757f05e027ead82a24cd8b7d4a3e90c5b01b59 (patch) | |
| tree | 33670c405892d449d298e56807ef7be6a3f74adc /lib/sqlalchemy/pool | |
| parent | c6abd4766abb0396c9bf532d81d16226b970a35a (diff) | |
| download | sqlalchemy-08757f05e027ead82a24cd8b7d4a3e90c5b01b59.tar.gz | |
Remove deprecated extension and similar classes
All long-deprecated "extension" classes have been removed, including
MapperExtension, SessionExtension, PoolListener, ConnectionProxy,
AttributExtension. These classes have been deprecated since version 0.7
long superseded by the event listener system.
Fixes: #4638
Change-Id: If4156d4956b10847bd93b6408a7c52ff5168db9b
Diffstat (limited to 'lib/sqlalchemy/pool')
| -rw-r--r-- | lib/sqlalchemy/pool/base.py | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/lib/sqlalchemy/pool/base.py b/lib/sqlalchemy/pool/base.py index c45f836db..db1197eec 100644 --- a/lib/sqlalchemy/pool/base.py +++ b/lib/sqlalchemy/pool/base.py @@ -16,7 +16,6 @@ import weakref from .. import event from .. import exc -from .. import interfaces from .. import log from .. import util from ..util import threading @@ -60,15 +59,6 @@ class Pool(log.Identified): _dialect = _ConnDialect() - @util.deprecated_params( - listeners=( - "0.7", - ":class:`.PoolListener` is deprecated in favor of the " - ":class:`.PoolEvents` listener interface. The " - ":paramref:`.Pool.listeners` parameter will be removed in a " - "future release.", - ) - ) def __init__( self, creator, @@ -76,7 +66,6 @@ class Pool(log.Identified): echo=None, logging_name=None, reset_on_return=True, - listeners=None, events=None, dialect=None, pre_ping=False, @@ -155,11 +144,6 @@ class Pool(log.Identified): can be assigned via :func:`.create_engine` before dialect-level listeners are applied. - :param listeners: A list of :class:`.PoolListener`-like objects or - dictionaries of callables that receive events when DB-API - connections are created, checked out and checked in to the - pool. - :param dialect: a :class:`.Dialect` that will handle the job of calling rollback(), close(), or commit() on DBAPI connections. If omitted, a built-in "stub" dialect is used. Applications that @@ -211,9 +195,6 @@ class Pool(log.Identified): if events: for fn, target in events: event.listen(self, target, fn) - if listeners: - for l in listeners: - self.add_listener(l) @property def _creator(self): @@ -260,22 +241,6 @@ class Pool(log.Identified): "Exception closing connection %r", connection, exc_info=True ) - @util.deprecated( - "0.7", - "The :meth:`.Pool.add_listener` method is deprecated and " - "will be removed in a future release. Please use the " - ":class:`.PoolEvents` listener interface.", - ) - def add_listener(self, listener): - """Add a :class:`.PoolListener`-like object to this pool. - - ``listener`` may be an object that implements some or all of - PoolListener, or a dictionary of callables containing implementations - of some or all of the named methods in PoolListener. - - """ - interfaces.PoolListener._adapt_listener(self, listener) - def _create_connection(self): """Called by subclasses to create a new ConnectionRecord.""" |
