Skip to content

fix(scanner): support Python 3.10 by falling back to tomli - #77

Merged
study8677 merged 1 commit into
mainfrom
fix/scanner-py310-tomllib
May 18, 2026
Merged

fix(scanner): support Python 3.10 by falling back to tomli#77
study8677 merged 1 commit into
mainfrom
fix/scanner-py310-tomllib

Conversation

@study8677

Copy link
Copy Markdown
Owner

Summary

  • _read_entry_points in engine/antigravity_engine/hub/scanner.py imports stdlib tomllib, which only exists on Python 3.11+. On 3.10 the ModuleNotFoundError was silently swallowed and entry points were never detected.
  • This is the root cause of engine-test (3.10) being red on main (test_full_scan_detects_entry_points_from_pyproject fails: assert 'ag_cli/cli.py' in {}). It is independent of build(deps): update openai-agents requirement from <0.15,>=0.12 to >=0.12,<0.18 in /engine #74 — the Dependabot openai-agents bump fails CI only because this pre-existing 3.10 bug blocks merge.
  • Fall back to the tomli backport on 3.10 and add a conditional dependency in engine/pyproject.toml.

Test plan

`_read_entry_points` only imported stdlib `tomllib` (Python 3.11+).
On 3.10 the `ModuleNotFoundError` was silently swallowed and entry
points were never detected, causing
`test_full_scan_detects_entry_points_from_pyproject` to fail on
`engine-test (3.10)` (red on main, independent of #74).

Fall back to the `tomli` backport on 3.10 and declare the conditional
dependency in `engine/pyproject.toml`. Verified locally that the test
suite passes on Python 3.10.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@study8677
study8677 merged commit 4192a00 into main May 18, 2026
8 checks passed
study8677 added a commit that referenced this pull request May 18, 2026
Manual replay of Dependabot PR #74. Dependabot's rebase produced
a conflict against the just-merged scanner 3.10 fix (#77), which
also touched engine/pyproject.toml.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant