Skip to content

Commit

Permalink
pythonGH-103247: bypass the import cache on the _require_loader helper
Browse files Browse the repository at this point in the history
This is not a fix for the importlib test monkeypatching leakage but it's
something that we probably should be doing anyway.

Signed-off-by: Filipe Laíns <lains@riseup.net>
  • Loading branch information
FFY00 committed May 5, 2023
1 parent fa86a77 commit 8be54d3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Lib/test/test_import/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
from unittest import mock
import _testinternalcapi

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,
Expand Down Expand Up @@ -57,7 +58,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',
Expand Down

0 comments on commit 8be54d3

Please sign in to comment.