From 01c50c64e302c193733cef7fb146fbab8eaa44bd Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Mon, 3 Jan 2022 13:49:26 -0500 Subject: Remove all remaining removed_in_20 warnings slated for removal Finalize all remaining removed-in-2.0 changes so that we can begin doing pep-484 typing without old things getting in the way (we will also have to do public_factory). note there are a few "moved_in_20()" and "became_legacy_in_20()" warnings still in place. The SQLALCHEMY_WARN_20 variable is now removed. Also removed here are the legacy "in place mutators" for Select statements, and some keyword-only argument signatures in Core have been added. Also in the big change department, the ORM mapper() function is removed entirely; the Mapper class is otherwise unchanged, just the public-facing API function. Mappers are now always given a registry in which to participate, however the argument signature of Mapper is not changed. ideally "registry" would be the first positional argument. Fixes: #7257 Change-Id: Ic70c57b9f1cf7eb996338af5183b11bdeb3e1623 --- test/orm/test_versioning.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test/orm/test_versioning.py') diff --git a/test/orm/test_versioning.py b/test/orm/test_versioning.py index 9d14ceba1..b5955e4a6 100644 --- a/test/orm/test_versioning.py +++ b/test/orm/test_versioning.py @@ -748,7 +748,7 @@ class VersionOnPostUpdateTest(fixtures.MappedTest): # outwit the database transaction isolation and SQLA's # expiration at the same time by using different Session on # same transaction - s2 = Session(bind=s.connection(mapper=Node)) + s2 = Session(bind=s.connection(bind_arguments=dict(mapper=Node))) s2.query(Node).filter(Node.id == n2.id).update({"version_id": 3}) s2.commit() @@ -770,7 +770,7 @@ class VersionOnPostUpdateTest(fixtures.MappedTest): ), patch.object( config.db.dialect, "supports_sane_multi_rowcount", False ): - s2 = Session(bind=s.connection(mapper=Node)) + s2 = Session(bind=s.connection(bind_arguments=dict(mapper=Node))) s2.query(Node).filter(Node.id == n2.id).update({"version_id": 3}) s2.commit() @@ -791,7 +791,7 @@ class VersionOnPostUpdateTest(fixtures.MappedTest): # outwit the database transaction isolation and SQLA's # expiration at the same time by using different Session on # same transaction - s2 = Session(bind=s.connection(mapper=Node)) + s2 = Session(bind=s.connection(bind_arguments=dict(mapper=Node))) s2.query(Node).filter(Node.id == n1.id).update({"version_id": 3}) s2.commit() -- cgit v1.2.1