Skip to content

Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.

fix: support py310 version sync scripts

JerrettDavis56f6307665a2
diff --git a/pyproject.toml b/pyproject.toml
index f3b9979dd..7591af01a 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -52,6 +52,7 @@ dependencies = [
"rich>=13.0.0", # Rich terminal output
"opentelemetry-api>=1.24.0", # Safe no-op OTEL API for instrumentation
"ast-grep-cli>=0.30.0", # AST-aware code slicing (CodeCompressor); binary wheel
+ "tomli>=2.0.0; python_version < '3.11'", # tomllib backport for helper scripts
]
[project.optional-dependencies]
diff --git a/scripts/verify-versions.py b/scripts/verify-versions.py
index 0693055ad..a234781db 100644
--- a/scripts/verify-versions.py
+++ b/scripts/verify-versions.py
@@ -4,7 +4,10 @@
import json
from pathlib import Path
-import tomllib
+try:
+ import tomllib
+except ImportError: # pragma: no cover - Python 3.10 fallback
+ import tomli as tomllib
ROOT = Path(__file__).parent.parent
diff --git a/scripts/version-sync.py b/scripts/version-sync.py
index 15aa9dcf9..741c47dcf 100644
--- a/scripts/version-sync.py
+++ b/scripts/version-sync.py
@@ -8,7 +8,10 @@ import json
import re
from pathlib import Path
-import tomllib
+try:
+ import tomllib
+except ImportError: # pragma: no cover - Python 3.10 fallback
+ import tomli as tomllib
def get_version_from_pyproject(root: Path) -> str: