Skip to content

Commit e6916d1

Browse files
more information in invalidate_caches comment
1 parent 6ab499b commit e6916d1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

bpython/test/test_curtsies_repl.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -299,13 +299,13 @@ def setUp(self):
299299
sys.dont_write_bytecode = True
300300

301301
# Because these tests create Python source files at runtime,
302-
# it's possible for the importlib.machinery.FileFinder for
303-
# a directory to have an outdated cache in the following situation:
302+
# it's possible in Python >=3.3 for the importlib.machinery.FileFinder
303+
# for a directory to have an outdated cache when
304304
# * a module in that directory is imported,
305305
# * then a new module is created in that directory,
306306
# * then that new module is imported.
307-
#
308-
# invalidate_cache() is used to prevent this.
307+
# Automatic cache invalidation is based on the second-resolution mtime
308+
# of the directory, so we need to manually call invalidate_caches().
309309
#
310310
# see https://docs.python.org/3/library/importlib.html
311311
# sections #importlib.machinery.FileFinder and

0 commit comments

Comments
 (0)