← Files LegalQuants TransactionalARCHIVED FILE
skills/closing-bible/scripts/_runtime_gate.py
882 Bytes · Oct 3, 2026 · 06:34 UTC
"""Parse-safe public-entry-point guard for Closing-bible."""
import json
import sys
MINIMUM_PYTHON = (3, 12)
def require_supported_python():
"""Exit cleanly before importing modules that require modern syntax."""
if sys.version_info >= MINIMUM_PYTHON:
return
found = ".".join(str(part) for part in sys.version_info[:3])
required = ".".join(str(part) for part in MINIMUM_PYTHON)
print(
json.dumps(
{
"status": "failed",
"error": (
"Closing-bible requires Python "
+ required
+ " or newer; this launcher is Python "
+ found
+ ". Select a newer installed Python runtime."
),
},
sort_keys=True,
),
file=sys.stderr,
)
raise SystemExit(2)
SHA-256: 23f65ede2b09d57adcc6040e28672a974a4b8907ad58dbe3227896e7c4cd23bb