Skip to content

Scheduled CI: the Python 3.10 jobs could never pass - #34

Merged
github-actions[bot] merged 1 commit into
mainfrom
fix/scheduled-ci-py310-tomllib
Aug 17, 2026
Merged

Scheduled CI: the Python 3.10 jobs could never pass#34
github-actions[bot] merged 1 commit into
mainfrom
fix/scheduled-ci-py310-tomllib

Conversation

@melbinjp

@melbinjp melbinjp commented Aug 17, 2026

Copy link
Copy Markdown
Owner

Closes #28.

What is broken

The Fresh Install matrix tests Python 3.10 and 3.14, and pyproject.toml declares requires-python = ">=3.10". The Build Wheel step then runs:

python -c "import tomllib; ..."

tomllib entered the stdlib in 3.11. So all three 3.10 jobs (ubuntu, macos, windows) have failed deterministically at that line on every scheduled run since 2026-08-03, while 3.14 passed.

The wheel was never the problem

From the log of run 32005130665, immediately before the traceback:

* Building wheel...
Successfully built rigout-0.3.1-py3-none-any.whl
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'tomllib'

File "<string>", line 1 is the inline -c, not the build.

Why this sat for three weeks

The auto-filed issue says a scheduled failure with no code change is "almost certainly a newly published dependency" and directs the reader to compare resolved versions against the bounds in pyproject.toml. That is a reasonable default and it was wrong here. Anyone following it went hunting through dependency bounds for a break that was six lines away in our own workflow. Worth knowing that the template can point away from the cause.

The fix

The standard fallback, with tomli installed only where it is needed:

try:
    import tomllib
except ModuleNotFoundError:  # Python 3.10
    import tomli as tomllib

Both branches were executed before pushing, tomllib present and tomllib forced absent so the fallback ran, and both return 0.3.1. The exact string bash receives was also checked after YAML block-indent stripping, since the snippet is indentation-sensitive.

Deliberately not changed

scheduled-ci.yml has a second tomllib use in Compare Caps Against Latest On PyPI. That job pins Python 3.12, so it is correct today and changing it would widen this diff. It would break the same way if that pin ever moved below 3.11.

… a dependency

The Fresh Install matrix tests Python 3.10 and 3.14, and pyproject declares
requires-python = ">=3.10". The Build Wheel step then ran:

    python -c "import tomllib; ..."

tomllib entered the stdlib in 3.11. So all three 3.10 jobs (ubuntu, macos,
windows) failed deterministically at that line, on every scheduled run since
2026-08-03, while 3.14 passed.

The wheel itself was never the problem. The log says "Successfully built
rigout-0.3.1-py3-none-any.whl" immediately before the traceback, and the
traceback frame is File "<string>", line 1 - the inline -c, not the build.

That matters because the auto-filed issue (#28) says a scheduled failure with
no code change is "almost certainly a newly published dependency" and points
at resolved dependency versions. Here that hypothesis was wrong and it is the
reason this sat for three weeks: anyone who followed it went looking through
dependency bounds for a break that was six lines away in our own workflow.

Fix is the standard fallback, with tomli installed only where it is needed.
Both branches were executed before pushing - tomllib present and tomllib
forced absent - and both return 0.3.1.

Note, deliberately not changed: scheduled-ci.yml has a second tomllib use in
Compare Caps Against Latest On PyPI. That job pins Python 3.12, so it is
correct today and touching it would widen this diff. It would break the same
way if that pin ever moved below 3.11.
@github-actions

github-actions Bot commented Aug 17, 2026

Copy link
Copy Markdown

Jules Review

COVERAGE: 028d246 1 files

Summary

The PR correctly resolves a scheduled CI failure on Python 3.10 jobs by conditionally installing tomli using an environment marker (python_version < "3.11") and providing a fallback import when tomllib (which was introduced in Python 3.11) is unavailable. The fix correctly uses shell: bash multiline string behavior and avoids modifying other jobs (like held-back-majors) that are already pinned to Python 3.12, making the changes targeted and correct.

VERDICT: approve


This review never edits code or force-blocks a merge. No blocking issues were found, so this PR was auto-approved.

@melbinjp

Copy link
Copy Markdown
Owner Author

Verified on this branch rather than argued for. Dispatched scheduled-ci via workflow_dispatch on fix/scheduled-ci-py310-tomllib (run 32051872175) — the PR's own CI does not include the scheduled workflow, so this was the only way to actually exercise the change.

The three jobs that had failed on every scheduled run since 2026-08-03:

Fresh Install (ubuntu-latest  - Python 3.10): completed success
Fresh Install (windows-latest - Python 3.10): completed success
Fresh Install (macos-15       - Python 3.10): completed success

The run as a whole still shows red, and not for a reason in this diff. Unit Tests (macos-15 - Python 3.12) reports 573 passed, 7 skipped and then:

##[error]Failed to CreateArtifact: Unable to make request: ENOTFOUND

That is the artifact upload failing to resolve GitHub's own endpoint. GitHub was mid-incident: gh pr merge on this PR got 503 Service Unavailable, Jules Review got a 503 posting a comment, and the workflow-dispatch API returned 503 twice before it took. Report Failure is downstream of the run being red, not an independent signal.

So the change is proven and the remaining red is external. Re-running the affected jobs now that the API is responding again.

@github-actions
github-actions Bot enabled auto-merge (squash) August 17, 2026 17:58

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated approval: Jules found no blocking issues (verdict: approve). See the review comment above.

@github-actions
github-actions Bot merged commit f11ad5a into main Aug 17, 2026
75 of 82 checks passed
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.

Scheduled CI is failing

1 participant