fix(scanner): support Python 3.10 by falling back to tomli - #77
Merged
Conversation
`_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>
This was referenced May 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
_read_entry_pointsinengine/antigravity_engine/hub/scanner.pyimports stdlibtomllib, which only exists on Python 3.11+. On 3.10 theModuleNotFoundErrorwas silently swallowed and entry points were never detected.engine-test (3.10)being red onmain(test_full_scan_detects_entry_points_from_pyprojectfails: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.tomlibackport on 3.10 and add a conditional dependency inengine/pyproject.toml.Test plan
pytest engine/tests/test_hub_scanner.pypasses under Python 3.10 locally (28/28).engine-test (3.10)turns green.