https://github.com/python/cpython/commit/feb9a49c9c09d08cb8c24cb74d90a218de6... commit: feb9a49c9c09d08cb8c24cb74d90a218de6af244 branch: main author: Filipe LaĆns <lains@riseup.net> committer: FFY00 <filipe.lains@gmail.com> date: 2023-08-24T21:05:03Z summary: GH-103247: bypass the import cache on the _require_loader helper files: M Lib/test/test_import/__init__.py diff --git a/Lib/test/test_import/__init__.py b/Lib/test/test_import/__init__.py index 051711bfd1fe2..559198759c0d2 100644 --- a/Lib/test/test_import/__init__.py +++ b/Lib/test/test_import/__init__.py @@ -25,6 +25,7 @@ import _testinternalcapi import _imp +from test.support import import_helper from test.support import os_helper from test.support import ( STDLIB_DIR, swap_attr, swap_item, cpython_only, is_emscripten, @@ -58,7 +59,7 @@ def _require_loader(module, loader, skip): if isinstance(module, str): - module = __import__(module) + module = import_helper.import_fresh_module(module) MODULE_KINDS = { BuiltinImporter: 'built-in',