Skip to content

fix(ci): support Python 3.10 in check_git_deps import - #106

Open
deanq wants to merge 1 commit into
mainfrom
fix/check-git-deps-tomllib-py310
Open

fix(ci): support Python 3.10 in check_git_deps import#106
deanq wants to merge 1 commit into
mainfrom
fix/check-git-deps-tomllib-py310

Conversation

@deanq

@deanq deanq commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

Problem

scripts/check_git_deps.py does an unconditional import tomllib. tomllib is stdlib only on Python 3.11+, so on the 3.10 test-matrix leg the module fails to import:

ModuleNotFoundError: No module named 'tomllib'

docker-validation depends on the test job, and release + every docker-prod-* publish job is gated on docker-validation. So this one 3.10 failure has reddened every push to main since the check landed (#104, 2026-07-28) and blocked release-please from cutting a release — meaning no base image has published since v1.4.4 (April). The SLS-377 torchvision fix (#101, merged 7/10) and later merges (e.g. SLS-360 #100) are stuck behind it.

It slipped review because PR CI only runs the 3.11/3.12 matrix, while push-to-main runs the full 3.10–3.14 matrix.

Fix

  • Guard the import: tomllib on 3.11+, tomli (drop-in backport) on <3.11.
  • Add tomli>=2.0.0; python_version < '3.11' to the dev dependency group so it's present in the 3.10 env.

No behavior change — tomli exposes the same loads / TOMLDecodeError API the script uses.

Test plan

Reproduced and verified under Python 3.10.17 (the failing leg):

  • Before: pytest tests/unit/test_check_git_deps.pyModuleNotFoundError: No module named 'tomllib' (collection error), matching CI.
  • After: check_git_deps tests 10 passed; full suite 293 passed @ 81% coverage; ruff check clean; ruff format --check clean; mypy clean; python scripts/check_git_deps.py exits 0.
  • Sanity-checked on 3.12 (guard takes the tomllib path): green.

Unblocks a release, which republishes runpod/flash:latest / py3.12-latest with torchvision 0.24.1+cu128 and closes SLS-377.

tomllib is stdlib only on 3.11+, so scripts/check_git_deps.py raised
ModuleNotFoundError on the 3.10 test matrix leg. Because docker-validation
depends on the test job, this reddened every push to main since the check
landed (#104) — blocking release-please and all image publishes, so the
SLS-377 torchvision fix (#101) and later merges never shipped.

PR CI only runs 3.11/3.12, so it passed review; push-to-main runs the full
3.10-3.14 matrix and caught it.

Guard the import with a tomli backport for <3.11 and add tomli to the dev
group under the same marker.
@deanq
deanq requested review from KAJdev, Yhlong00 and jhcipar August 14, 2026 21:05
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.

2 participants