summaryrefslogtreecommitdiff
path: root/test/base/test_utils.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2020-10-06 21:46:03 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2020-10-06 22:25:23 -0400
commitf3268b6f2fa5ac7023f656caa085316fa46b24e9 (patch)
tree8974b2d5345ef78d7025decbc314b03b71075818 /test/base/test_utils.py
parent402cca8f2ac42a08fba7a200c4e1e086e2081aad (diff)
downloadsqlalchemy-f3268b6f2fa5ac7023f656caa085316fa46b24e9.tar.gz
Use preloaded for sql.util import in exc
Repaired a function-level import that was not using SQLAlchemy's standard late-import system within the sqlalchemy.exc module. Moved preloaded to sqlalchemy.util.preloaded so that it does not depend on langhelpers which depends on exc. Fixes: #5632 Change-Id: I61b7ce9cd461071ce543714739f67aa5aeb47fd6
Diffstat (limited to 'test/base/test_utils.py')
-rw-r--r--test/base/test_utils.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/base/test_utils.py b/test/base/test_utils.py
index d765a4613..fa347243e 100644
--- a/test/base/test_utils.py
+++ b/test/base/test_utils.py
@@ -24,6 +24,7 @@ from sqlalchemy.testing import mock
from sqlalchemy.testing import ne_
from sqlalchemy.testing.util import gc_collect
from sqlalchemy.testing.util import picklers
+from sqlalchemy.util import _preloaded
from sqlalchemy.util import classproperty
from sqlalchemy.util import compat
from sqlalchemy.util import get_callable_argspec
@@ -3210,7 +3211,7 @@ class TestModuleRegistry(fixtures.TestBase):
for m in ("xml.dom", "wsgiref.simple_server"):
to_restore.append((m, sys.modules.pop(m, None)))
try:
- mr = langhelpers._ModuleRegistry()
+ mr = _preloaded._ModuleRegistry()
ret = mr.preload_module(
"xml.dom", "wsgiref.simple_server", "sqlalchemy.sql.util"