From: jonathan vanasco Date: Thu, 21 Jan 2021 17:25:04 +0000 (-0500) Subject: Removed some legacy terms in favor of modern equivalents. (D&I) X-Git-Tag: rel_1_3_23~10 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9066f4c6cf935b8067e04ebe8883f8df9ca4b732;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git 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) --- diff --git a/lib/sqlalchemy/testing/fixtures.py b/lib/sqlalchemy/testing/fixtures.py index bce6efe6df..841823419f 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 7aaea4fbb3..0beea7ab3f 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 b714d139e6..9db764c86e 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]: diff --git a/tox.ini b/tox.ini index 3809ed34e6..2985bbe727 100644 --- 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