]> 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)
committerjonathan vanasco <jonathan@2xlp.com>
Thu, 21 Jan 2021 17:25:04 +0000 (12:25 -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

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

index 45ca4844497237f1d6ca8e7c02b006cbf8084ad5..515be459b91251bed9468f29b3eb18689144f375 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 5374e19cd13960cefac197bf4d359577bd72c117..f162220c4fd0ff12fb08fd53cc3f01e707a90b65 100644 (file)
@@ -12,7 +12,7 @@ deps=pytest
      db_mssql: .[mssql]
 
 
-whitelist_externals=sh
+allowlist_externals=sh
 
 commands=
     db_{mysql}: {env:BASECOMMAND} {env:MYSQL:} {posargs}
index 3d4566af3eeecb8f2f1bbd0c771e0365af242fa1..23826128c10bbf5de719d9678ce1d89dc431b53a 100644 (file)
@@ -1811,7 +1811,7 @@ class SessionInterface(fixtures.TestBase):
     def _public_session_methods(self):
         Session = sa.orm.session.Session
 
-        blacklist = {"begin", "query", "bind_mapper", "get", "bind_table"}
+        blocklist = {"begin", "query", "bind_mapper", "get", "bind_table"}
         specials = {"__iter__", "__contains__"}
         ok = set()
         for name in dir(Session):
@@ -1823,7 +1823,7 @@ class SessionInterface(fixtures.TestBase):
                     or _py_inspect.isfunction(getattr(Session, name))
                 )
             ):
-                if name in blacklist:
+                if name in blocklist:
                     continue
                 spec = inspect_getfullargspec(getattr(Session, name))
                 if len(spec[0]) > 1 or spec[1]:
diff --git a/tox.ini b/tox.ini
index ea2b76e1665268bd594c2da4422971655d7b3298..41892a2fffc6ff289e23b2ea991df76228198374 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -39,7 +39,7 @@ deps=
 
      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