fix(ci): raise the declared Python floor to 3.11 - #800
Conversation
`typing.assert_never` (build_spec.py) and `enum.StrEnum` are 3.11 additions imported at module scope, so 3.10 cannot import comfy_cli at all -- the declared `>=3.10` floor and the 3.10 CI matrix have been describing a configuration that never worked. Raise requires-python, the classifiers, ruff's target-version and every workflow pinned to "follow the min version in pyproject.toml", so the test job that runs on the floor is what keeps the floor honest. Retargeting ruff to py311 makes it see the 3.10 compatibility shims the floor obsoletes: adopt `datetime.UTC` and drop the `sys.version_info >= (3, 11)` guard around `-P`, which now hardens sys.path unconditionally. UP042 stays off -- switching the nine `(str, Enum)` Typer choice types to StrEnum changes `str(OS.WINDOWS)` from "OS.WINDOWS" to "windows", which is user-visible output, not a lint fix. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (24)
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe project now requires Python 3.11. CI workflows, documentation, metadata, and lock data reflect this requirement. Runtime timestamp handling uses ChangesPython 3.11 support contract
Runtime modernization
Test alignment
Suggested reviewers: Merge Risk: ⚪ Minimal · up to This PR raises the supported Python version and updates the related CI and metadata. No actionable merge-blocking risk remains at the current head after normal checks and review. 🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
✨ Simplify code
Comment |
|
Closing this in favour of making the new code 3.10-compatible instead. The premise no longer holds. This PR argued that
(The one failure in that run is So What happened instead. The rest of the stack (#801–#805) has been rebased onto
Every commit in the stack now passes the full suite on both 3.10 and 3.11, and The |
Stack of 6 — review bottom-up (this is 800)
fix(ci): raise the Python floor to 3.11 — basemain← this PRfeat(build): packaging, sync and Builder client primitivesfeat(build)!: replace the legacy build and distribution surface (breaking)feat(deploy): the deployment control planefeat(deploy): the asset and job data-plane clientscomfy deploy run#805 —feat(deploy):comfy deploy runEach PR is based on the branch below it, so its own diff is only its commit. Merge in order.
TL;DR:
comfy_clihas never been importable on Python 3.10 —typing.assert_never(build_spec.py) andenum.StrEnumare 3.11 additions imported at module scope — so the declared>=3.10floor and the 3.10 CI matrix have been describing a configuration that never worked. This raises the floor to 3.11 everywhere it is written down.Bottom of a six-PR stack; nothing below it. Review from the bottom up.
What changed
requires-python, the classifiers and ruff'starget-versionall move to 3.11.uv.lock,pylock.toml): re-resolved against the new floor.datetime.UTC, and drops thesys.version_info >= (3, 11)guard around-Psosys.pathis now hardened unconditionally.One deliberate omission: UP042 stays off. Switching the nine
(str, Enum)Typer choice types toStrEnumchangesstr(OS.WINDOWS)from"OS.WINDOWS"to"windows"— that is user-visible output, not a lint fix.Validation
uv run --locked --extra dev pytest -qat this commit: 6073 passed, 38 skipped, 1 failed.test_build.py::test_scan_custom_nodes_records_repo_and_ref, and it is pre-existing and environmental, not from this change. It reproduces identically on a cleanorigin/maincheckout. Cause: a localurl.git@github.com:.insteadOf https://github.com/git rewrite on the dev machine — the fixture writes anhttps://remote and reads back thegit@form, so the literal-URL assertion fails. CI runners carry no such rewrite.ruff check ./ruff format --diff .clean at CI's pin (0.15.15).Contradicts: nothing.