diff options
| author | mike bayer <mike_mp@zzzcomputing.com> | 2020-03-23 18:55:02 +0000 |
|---|---|---|
| committer | Gerrit Code Review <gerrit@bbpush.zzzcomputing.com> | 2020-03-23 18:55:02 +0000 |
| commit | e6b6ec78e6d6f96537eaf542f469a7e88134e9fc (patch) | |
| tree | 9f5958d2cf2e03a80af7e862746c6d016560bd65 /lib/sqlalchemy/orm/session.py | |
| parent | 01299b6bdaf91691923a99fd8c0241dac6abc432 (diff) | |
| parent | 0a4f7f38ce2b878a4e59da74373938b64bbb6e92 (diff) | |
| download | sqlalchemy-e6b6ec78e6d6f96537eaf542f469a7e88134e9fc.tar.gz | |
Merge "Remove deprecated elements from selectable.py; remove lockmode"
Diffstat (limited to 'lib/sqlalchemy/orm/session.py')
| -rw-r--r-- | lib/sqlalchemy/orm/session.py | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/lib/sqlalchemy/orm/session.py b/lib/sqlalchemy/orm/session.py index fefdd4ef1..c773aeb08 100644 --- a/lib/sqlalchemy/orm/session.py +++ b/lib/sqlalchemy/orm/session.py @@ -1664,11 +1664,7 @@ class Session(_SessionClassMethods): util.raise_(e, with_traceback=sys.exc_info()[2]) def refresh( - self, - instance, - attribute_names=None, - with_for_update=None, - lockmode=None, + self, instance, attribute_names=None, with_for_update=None, ): """Expire and refresh the attributes on the given instance. @@ -1701,10 +1697,6 @@ class Session(_SessionClassMethods): .. versionadded:: 1.2 - :param lockmode: Passed to the :class:`~sqlalchemy.orm.query.Query` - as used by :meth:`~sqlalchemy.orm.query.Query.with_lockmode`. - Superseded by :paramref:`.Session.refresh.with_for_update`. - .. seealso:: :ref:`session_expire` - introductory material @@ -1730,13 +1722,11 @@ class Session(_SessionClassMethods): "A blank dictionary is ambiguous." ) - if lockmode: - with_for_update = query.LockmodeArg.parse_legacy_query(lockmode) - elif with_for_update is not None: + if with_for_update is not None: if with_for_update is True: - with_for_update = query.LockmodeArg() + with_for_update = query.ForUpdateArg() elif with_for_update: - with_for_update = query.LockmodeArg(**with_for_update) + with_for_update = query.ForUpdateArg(**with_for_update) else: with_for_update = None |
