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/orm/session.py | |
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/orm/session.py')
-rw-r--r-- | lib/sqlalchemy/orm/session.py | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/lib/sqlalchemy/orm/session.py b/lib/sqlalchemy/orm/session.py index 3aa392ecf..5cf31da0f 100644 --- a/lib/sqlalchemy/orm/session.py +++ b/lib/sqlalchemy/orm/session.py @@ -25,7 +25,6 @@ from .base import instance_str from .base import object_mapper from .base import object_state from .base import state_str -from .deprecated_interfaces import SessionExtension from .unitofwork import UOWTransaction from .. import engine from .. import exc as sa_exc @@ -37,7 +36,7 @@ from ..sql import roles from ..sql import util as sql_util -__all__ = ["Session", "SessionTransaction", "SessionExtension", "sessionmaker"] +__all__ = ["Session", "SessionTransaction", "sessionmaker"] _sessions = weakref.WeakValueDictionary() """Weak-referencing dictionary of :class:`.Session` objects. @@ -660,13 +659,6 @@ class Session(_SessionClassMethods): "The :paramref:`.Session._enable_transaction_accounting` " "parameter is deprecated and will be removed in a future release.", ), - extension=( - "0.7", - ":class:`.SessionExtension` is deprecated in favor of the " - ":class:`.SessionEvents` listener interface. The " - ":paramref:`.Session.extension` parameter will be " - "removed in a future release.", - ), ) def __init__( self, @@ -678,7 +670,6 @@ class Session(_SessionClassMethods): twophase=False, weak_identity_map=None, binds=None, - extension=None, enable_baked_queries=True, info=None, query_cls=None, @@ -789,11 +780,6 @@ class Session(_SessionClassMethods): so that all attribute/object access subsequent to a completed transaction will load from the most recent database state. - :param extension: An optional - :class:`~.SessionExtension` instance, or a list - of such instances, which will receive pre- and post- commit and - flush events, as well as a post-rollback event. - :param info: optional dictionary of arbitrary data to be associated with this :class:`.Session`. Is available via the :attr:`.Session.info` attribute. Note the dictionary is copied at @@ -850,10 +836,6 @@ class Session(_SessionClassMethods): if info: self.info.update(info) - if extension: - for ext in util.to_list(extension): - SessionExtension._adapt_listener(self, ext) - if binds is not None: for key, bind in binds.items(): self._add_bind(key, bind) |