Skip to content

Commit 740a6bb

Browse files
committed
bytecode_imports_allowed -> bytecode_caching_allowed
1 parent f75560c commit 740a6bb

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

pyccolo/import_hooks.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -127,14 +127,14 @@ def get_data(self, path: str) -> bytes:
127127
path_no_ext, ext = os.path.splitext(path)
128128
sep = os.path.extsep
129129
if ext == sep + "pyc":
130-
bytecode_imports_allowed = all(
130+
bytecode_caching_allowed = all(
131131
tracer.bytecode_caching_allowed for tracer in self._tracers
132132
)
133133
parts = path.split(sep)
134-
if bytecode_imports_allowed and len(parts) < 3:
134+
if bytecode_caching_allowed and len(parts) < 3:
135135
return super().get_data(path)
136136
source_path = pyccolo_source_from_cache(path)
137-
if bytecode_imports_allowed and self.make_cache_signature(source_path) in (
137+
if bytecode_caching_allowed and self.make_cache_signature(source_path) in (
138138
parts[-3],
139139
"pyccolo",
140140
):
@@ -230,12 +230,12 @@ def exec_module(self, module: ModuleType) -> None:
230230
should_reenable_saved_state = []
231231
enforce_pickled_bookkeeping = False
232232
tracer = None
233-
bytecode_imports_allowed = True
233+
bytecode_caching_allowed = True
234234
for tracer in reversed(self._tracers):
235235
should_disable = False
236236
if tracer._should_instrument_file_impl(source_path):
237-
bytecode_imports_allowed = (
238-
tracer.bytecode_caching_allowed and bytecode_imports_allowed
237+
bytecode_caching_allowed = (
238+
tracer.bytecode_caching_allowed and bytecode_caching_allowed
239239
)
240240
enforce_pickled_bookkeeping = (
241241
enforce_pickled_bookkeeping or tracer.requires_ast_bookkeeping
@@ -246,7 +246,7 @@ def exec_module(self, module: ModuleType) -> None:
246246
if should_disable:
247247
tracer._disable_tracing()
248248
enforce_pickled_bookkeeping = (
249-
enforce_pickled_bookkeeping and bytecode_imports_allowed
249+
enforce_pickled_bookkeeping and bytecode_caching_allowed
250250
)
251251
pickle_path = None
252252
if enforce_pickled_bookkeeping:

0 commit comments

Comments
 (0)