]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Removed some legacy terms in favor of modern equivalents. (D&I)
authorjonathan vanasco <jonathan@2xlp.com>
Thu, 21 Jan 2021 17:25:04 +0000 (12:25 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sat, 23 Jan 2021 15:29:51 +0000 (10:29 -0500)
Migrated testing fixture:
`TestBase.__whitelist__` -> `TestBase.__allowlist__`

Migrated tox commands from deprecated to current:
`whitelist_externals` > `allowlist_externals`

Migrated test_session:
`blacklist` -> `blocklist`

Change-Id: I395d5ee977ff22fa703276b9b873cc96c59b9a35
(cherry picked from commit f6fca84a7ffc71d743bea22e688ef3c944ba545b)

lib/sqlalchemy/testing/fixtures.py
regen_callcounts.tox.ini
test/orm/test_session.py
tox.ini

index bce6efe6df5d66f25f7982d04b89c5c247ef2151..841823419f78cfa9b35ce2a1405ff428d1fc0f73 100644 (file)
@@ -30,7 +30,7 @@ from ..schema import sort_tables_and_constraints
 class TestBase(object):
     # A sequence of database names to always run, regardless of the
     # constraints below.
-    __whitelist__ = ()
+    __allowlist__ = ()
 
     # A sequence of requirement names matching testing.requires decorators
     __requires__ = ()
index 7aaea4fbb34d132c45837b2a99e3615aebdde6f1..0beea7ab3f466c1bf3eeb39b1d89042092a13878 100644 (file)
@@ -11,7 +11,7 @@ deps=pytest
      db_mssql: .[mssql]
 
 
-whitelist_externals=sh
+allowlist_externals=sh
 
 commands=
     db_{mysql}: {env:BASECOMMAND} {env:MYSQL:} {posargs}
index b714d139e6679f5249801cc744021e1a966d89bb..9db764c86ee648948782412f373ad629e8b7a894 100644 (file)
@@ -1726,11 +1726,11 @@ class SessionInterface(fixtures.TestBase):
     def _public_session_methods(self):
         Session = sa.orm.session.Session
 
-        blacklist = set(("begin", "query"))
+        blocklist = set(("begin", "query"))
 
         ok = set()
         for meth in Session.public_methods:
-            if meth in blacklist:
+            if meth in blocklist:
                 continue
             spec = inspect_getfullargspec(getattr(Session, meth))
             if len(spec[0]) > 1 or spec[1]:
diff --git a/tox.ini b/tox.ini
index 3809ed34e6c2cde3af56d70c980d6147474e3b46..2985bbe7270ee184cdaccd2560e460f822491df6 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -36,7 +36,7 @@ deps=pytest>=4.6.11 # this can be 6.x once we are on python 3 only
      mssql: pyodbc
      cov: pytest-cov
 
-whitelist_externals=sh
+allowlist_externals=sh
 
 # PYTHONPATH - erased so that we use the build that's present
 # in .tox as the SQLAlchemy library to be imported