wdi-method 0.5.9 → 0.5.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -213,6 +213,12 @@ def load_readers(root: Path):
|
|
|
213
213
|
if spec is None or spec.loader is None:
|
|
214
214
|
raise SystemExit(f"inventory: {READERS.as_posix()} could not be loaded as Python")
|
|
215
215
|
mod = importlib.util.module_from_spec(spec)
|
|
216
|
+
# Importing the readers writes .constitution/project/__pycache__/ into the product. A method
|
|
217
|
+
# script MUST NOT leave litter in the repo it was asked to read — and a .pyc is worse than
|
|
218
|
+
# litter: an older CPython stores the absolute path it was compiled from, which is why
|
|
219
|
+
# walkFiles refuses to publish one. A product whose .gitignore lacks __pycache__ would commit
|
|
220
|
+
# it. Turned off here rather than at module level so it is unmistakably about this import.
|
|
221
|
+
sys.dont_write_bytecode = True
|
|
216
222
|
mod.Row, mod.Derived, mod.decisions = Row, Derived, decisions
|
|
217
223
|
spec.loader.exec_module(mod)
|
|
218
224
|
missing = [f"derive_{k}" for k in KINDS if not callable(getattr(mod, f"derive_{k}", None))]
|