]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-76785: Fix test_threading on Non-Subinterpreter Builds (gh-113014)
authorEric Snow <ericsnowcurrently@gmail.com>
Tue, 12 Dec 2023 16:54:39 +0000 (09:54 -0700)
committerGitHub <noreply@github.com>
Tue, 12 Dec 2023 16:54:39 +0000 (16:54 +0000)
gh-112982 broke test_threading on one of the s390 buildbots (Fedora Clang Installed).  Apparently ImportError is raised (rather than ModuleNotFoundError) for the name part of "from" imports.  This fixes that by catching ImportError in test_threading.py.

Lib/test/test_threading.py

index a5744a4037ecea13451e584a5929d6a8c68b8559..3060af44fd7e3d220aa2db6feea13f840d9fbff8 100644 (file)
@@ -28,7 +28,7 @@ from test import support
 
 try:
     from test.support import interpreters
-except ModuleNotFoundError:
+except ImportError:
     interpreters = None
 
 threading_helper.requires_working_threading(module=True)