]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Add with_for_update() support in session.refresh()
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 15 May 2017 13:39:19 +0000 (09:39 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 24 May 2017 20:23:56 +0000 (16:23 -0400)
commitde11c5217b4c62f86dfd05a28689159095ab1024
tree0b1521f3f770f47ea209c4a45ab51a7f225e2fca
parent9a37503bbedcb958e515ea91c2322efb96bf2680
Add with_for_update() support in session.refresh()

Session.refresh() is still hardcoded to legacy lockmode,
come up with a new API so that the newer argument style
works with it.

Added new argument :paramref:`.with_for_update` to the
:meth:`.Session.refresh` method.  When the :meth:`.Query.with_lockmode`
method were deprecated in favor of :meth:`.Query.with_for_update`,
the :meth:`.Session.refresh` method was never updated to reflect
the new option.

Change-Id: Ia02a653746b7024699b515451525a88d7a17d63a
Fixes: #3991
doc/build/changelog/changelog_12.rst
doc/build/changelog/migration_12.rst
lib/sqlalchemy/orm/loading.py
lib/sqlalchemy/orm/session.py
lib/sqlalchemy/sql/selectable.py
test/orm/test_session.py
test/orm/test_versioning.py