We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d75ba0f commit 3af804dCopy full SHA for 3af804d
graalpython/com.oracle.graal.python.test/src/tests/cpyext/__init__.py
@@ -38,6 +38,7 @@
38
# SOFTWARE.
39
40
import sys
41
+from importlib import invalidate_caches
42
from string import Formatter
43
os = sys.modules.get("posix", sys.modules.get("nt", None))
44
if os is None:
@@ -87,6 +88,11 @@ def ccompile(self, name):
87
88
binary_file_llvm = '%s/%s.bc' % (__dir__, name)
89
if GRAALPYTHON:
90
file_not_empty(binary_file_llvm)
91
+ # IMPORTANT:
92
+ # Invalidate caches after creating the native module.
93
+ # FileFinder caches directory contents, and the check for directory
94
+ # changes has whole-second precision, so it can miss quick updates.
95
+ invalidate_caches()
96
97
98
def file_not_empty(path):
0 commit comments