[Python-checkins] cpython: Issue #14599: Fix an import caching race condition.

brett.cannon python-checkins at python.org
Tue Apr 17 02:50:39 CEST 2012


http://hg.python.org/cpython/rev/00a07720a570
changeset: 76370:00a07720a570
user: Brett Cannon <brett at python.org>
date: Mon Apr 16 20:50:33 2012 -0400
summary:
 Issue #14599: Fix an import caching race condition.
files:
 Lib/test/test_import.py | 1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/Lib/test/test_import.py b/Lib/test/test_import.py
--- a/Lib/test/test_import.py
+++ b/Lib/test/test_import.py
@@ -346,6 +346,7 @@
 pkg_name = "extension"
 pkg_file = pkg_name + "{}".format("_d.pyd" if debug else ".pyd")
 with open(pkg_file, "w"): pass
+ importlib.invalidate_caches()
 try:
 with self.assertRaises(ImportError) as err:
 import extension
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /