Skip to content

ci: enforce the python 3.10 floor with vermin and a 3.10 test-collection job - #16308

Open
synap5e wants to merge 1 commit into
synap5e/fix/typing-310-floorfrom
synap5e/ci/python-310-floor
Open

synap5e wants to merge 1 commit into
synap5e/fix/typing-310-floorfrom
synap5e/ci/python-310-floor

Conversation

@synap5e

@synap5e synap5e commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

pyproject.toml declares requires-python = ">=3.10" but nothing in CI enforces it. Unit Tests pin 3.12, Build Test (3.10) only pip-installs requirements.txt, and the launch test only proves startup imports on 3.10 — which leaves ~24 production modules uncovered (lazy model-family imports such as comfy/text_encoders/sam3_clip.py and comfy/ldm/modules/temporal_ae.py), and never sees 3.11+ names used inside function bodies of the modules it does import.

Two jobs:

  • Static Floor Check — vermin==1.8.0 over the production tree (comfy/, comfy_extras/, comfy_api/, comfy_api_nodes/, comfy_execution/, comfy_config/, app/, api_server/, utils/, middleware/, top-level *.py) with --target=3.10- --violations. AST-level, so it catches 3.11+ names anywhere in a file, not just at import time. Runs in seconds, no torch install.
  • Test Collection 3.10 — installs the same way test-unit.yml does and runs pytest tests-unit --collect-only -q on a real 3.10. Collection executes every module-level import in the test tree, which is exactly the class of breakage that shipped unnoticed.

Stacked on #16305 deliberately: the collection job is red against master until that merges (from typing import NotRequired in the assets tests). Basing it here keeps this PR's own guard green, and pull_request carries no branches: filter — matching ruff.yml — so both jobs run on this stacked PR and prove themselves before merge.

Two vermin --exclude flags are load-bearing rather than cosmetic. long is torch.Tensor.long() misread as the removed Python 2 builtin; string.rsplit is a local variable named string in comfy/ldm/util.py misread as the Python 2 string module. Both are Python 2 rules that cannot affect a 3.10 floor, but left in they put 14 files into vermin's "versions could not be combined" state, where a real 3.11 finding is downgraded to inconclusive and the run exits 0. Verified by injecting NotRequired into one of those files: masked without the excludes, caught with them. No directory is excluded and the target is not lowered.

The tree is 3.10-clean today, so the guard starts green: vermin exits 0 locally, and collection on a local 3.10 env gathers 1745 tests with the #16305 fix present.

@synap5e
synap5e force-pushed the synap5e/fix/typing-310-floor branch from e456f16 to 3bb905e Compare September 14, 2026 03:48
@synap5e
synap5e marked this pull request as ready for review September 14, 2026 04:26
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 14, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-14T04:29:15.803702Z ab4b69a Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@synap5e
synap5e force-pushed the synap5e/ci/python-310-floor branch from ab4b69a to 681c732 Compare September 14, 2026 04:27

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ab4b69a64e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +42 to +43
app/ \
api_server/ \

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Include Alembic migrations in the Python-floor scan

When a migration under alembic_db/ uses Python 3.11-only syntax or APIs, neither new job catches it: this Vermin path list omits that directory, and pytest --collect-only imports the migration tests without executing their command.upgrade(...) calls. app/database/db.py configures alembic_db/ as the script directory and executes those migrations during database initialization, so such a change could still crash startup for Python 3.10 users despite this check; add alembic_db/ to the scanned paths.

Useful? React with 👍 / 👎.

@synap5e synap5e assigned synap5e and unassigned guill Sep 29, 2026

This branch has not been deployed

No deployments
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