summaryrefslogtreecommitdiff
path: root/test/aaa_profiling
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2022-01-03 13:49:26 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2022-01-05 19:28:49 -0500
commit01c50c64e302c193733cef7fb146fbab8eaa44bd (patch)
treedca946206da557a14a681768d094b92c95dfabe4 /test/aaa_profiling
parent146a349d81023805264f81643db50a5281da90da (diff)
downloadsqlalchemy-01c50c64e302c193733cef7fb146fbab8eaa44bd.tar.gz
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
Diffstat (limited to 'test/aaa_profiling')
-rw-r--r--test/aaa_profiling/test_memusage.py4
-rw-r--r--test/aaa_profiling/test_misc.py2
-rw-r--r--test/aaa_profiling/test_orm.py6
3 files changed, 7 insertions, 5 deletions
diff --git a/test/aaa_profiling/test_memusage.py b/test/aaa_profiling/test_memusage.py
index 316e7d7d4..10ec4d307 100644
--- a/test/aaa_profiling/test_memusage.py
+++ b/test/aaa_profiling/test_memusage.py
@@ -1449,7 +1449,9 @@ class CycleTest(_fixtures.FixtureTest):
@assert_cycles(4)
def go():
- result = s.connection(mapper=User).execute(stmt)
+ result = s.connection(bind_arguments=dict(mapper=User)).execute(
+ stmt
+ )
while True:
row = result.fetchone()
if row is None:
diff --git a/test/aaa_profiling/test_misc.py b/test/aaa_profiling/test_misc.py
index c0508a3cf..13848a7bd 100644
--- a/test/aaa_profiling/test_misc.py
+++ b/test/aaa_profiling/test_misc.py
@@ -46,7 +46,7 @@ class EnumTest(fixtures.TestBase):
@profiling.function_call_count()
def test_create_enum_from_pep_435_w_expensive_members(self):
- Enum(self.SomeEnum)
+ Enum(self.SomeEnum, omit_aliases=False)
class CacheKeyTest(fixtures.TestBase):
diff --git a/test/aaa_profiling/test_orm.py b/test/aaa_profiling/test_orm.py
index 128a78714..cfc697d5e 100644
--- a/test/aaa_profiling/test_orm.py
+++ b/test/aaa_profiling/test_orm.py
@@ -94,7 +94,7 @@ class MergeTest(NoCache, fixtures.MappedTest):
# down from 185 on this this is a small slice of a usually
# bigger operation so using a small variance
- sess2._legacy_transaction() # autobegin
+ sess2.connection() # autobegin
@profiling.function_call_count(variance=0.20)
def go1():
@@ -104,7 +104,7 @@ class MergeTest(NoCache, fixtures.MappedTest):
# third call, merge object already present. almost no calls.
- sess2._legacy_transaction() # autobegin
+ sess2.connection() # autobegin
@profiling.function_call_count(variance=0.10, warmup=1)
def go2():
@@ -124,7 +124,7 @@ class MergeTest(NoCache, fixtures.MappedTest):
# using sqlite3 the C extension took it back up to approx. 1257
# (py2.6)
- sess2._legacy_transaction() # autobegin
+ sess2.connection() # autobegin
@profiling.function_call_count(variance=0.10)
def go():