From ed8ce73838009f465a4de0f18db5c5a9236ea97d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Simon?= Date: Fri, 3 Oct 2025 15:12:36 +0200 Subject: [PATCH] [TEMP] Looks like a cache issue indeed --- Lib/_pyrepl/_module_completer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lib/_pyrepl/_module_completer.py b/Lib/_pyrepl/_module_completer.py index fd1de7c9535..ca9c5d67a3f 100644 --- a/Lib/_pyrepl/_module_completer.py +++ b/Lib/_pyrepl/_module_completer.py @@ -228,8 +228,8 @@ def global_cache(self) -> list[pkgutil.ModuleInfo]: spec = mymod.module_finder.find_spec(mymod.name, None) print("found spec:", spec) mymod.module_finder.invalidate_caches() - spec = mymod.module_finder.find_spec(mymod.name, None) - print("found spec after invalidate:", spec) + not_cached_spec = mymod.module_finder.find_spec(mymod.name, None) + print("found spec after invalidate:", not_cached_spec) if spec: print("1") assert spec.submodule_search_locations and len(spec.submodule_search_locations) == 1