diff options
author | jonathan vanasco <jonathan@2xlp.com> | 2021-01-21 12:25:04 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2021-01-23 10:29:51 -0500 |
commit | 9066f4c6cf935b8067e04ebe8883f8df9ca4b732 (patch) | |
tree | 86d9d359d865a223e7d906158cc0155c1a28bbe4 | |
parent | 90a2d8010f4b287b3afede19b0f78755001aeb55 (diff) | |
download | sqlalchemy-9066f4c6cf935b8067e04ebe8883f8df9ca4b732.tar.gz |
Removed some legacy terms in favor of modern equivalents. (D&I)
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)
-rw-r--r-- | lib/sqlalchemy/testing/fixtures.py | 2 | ||||
-rw-r--r-- | regen_callcounts.tox.ini | 2 | ||||
-rw-r--r-- | test/orm/test_session.py | 4 | ||||
-rw-r--r-- | tox.ini | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/lib/sqlalchemy/testing/fixtures.py b/lib/sqlalchemy/testing/fixtures.py index bce6efe6d..841823419 100644 --- a/lib/sqlalchemy/testing/fixtures.py +++ b/lib/sqlalchemy/testing/fixtures.py @@ -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__ = () diff --git a/regen_callcounts.tox.ini b/regen_callcounts.tox.ini index 7aaea4fbb..0beea7ab3 100644 --- a/regen_callcounts.tox.ini +++ b/regen_callcounts.tox.ini @@ -11,7 +11,7 @@ deps=pytest db_mssql: .[mssql] -whitelist_externals=sh +allowlist_externals=sh commands= db_{mysql}: {env:BASECOMMAND} {env:MYSQL:} {posargs} diff --git a/test/orm/test_session.py b/test/orm/test_session.py index b714d139e..9db764c86 100644 --- a/test/orm/test_session.py +++ b/test/orm/test_session.py @@ -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]: @@ -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 |