From: Eric Snow Date: Tue, 12 Dec 2023 16:54:39 +0000 (-0700) Subject: gh-76785: Fix test_threading on Non-Subinterpreter Builds (gh-113014) X-Git-Tag: v3.13.0a3~420 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cde141717578f22947553db776980aa3e8801353;p=thirdparty%2FPython%2Fcpython.git gh-76785: Fix test_threading on Non-Subinterpreter Builds (gh-113014) 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. --- diff --git a/Lib/test/test_threading.py b/Lib/test/test_threading.py index a5744a4037ec..3060af44fd7e 100644 --- a/Lib/test/test_threading.py +++ b/Lib/test/test_threading.py @@ -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)