Summary#
Using stdlib symbols introduced in a newer Python than the project's declared minimum causes the entire test suite to fail at collection rather than at runtime, making the breakage look like a global infrastructure failure rather than a version mismatch. The root cause is especially hard to spot when the affected file is a shared helper imported by most of the suite. Fast-follow cherry-pick PRs are needed when such a regression slips past review.
Problem#
Test helpers used typing.NotRequired and typing.assert_never (Python 3.11+) while the project declared requires-python = '>=3.10'. Because the helper was imported by nearly every test in the suite, pytest failed at collection on 3.10 with an ImportError before any test could run.
Solution#
Use typing_extensions backports or sys.version_info guards for any stdlib symbol not available in the declared minimum version. Run CI explicitly on the minimum declared version. When a regression slips through, cherry-pick the fix as a fast-follow PR rather than bundling it.
Failure Modes#
- Local dev environments running a newer Python silently pass; only minimum-version CI catches the breakage
- Collection-time ImportError looks like a broken test runner, not a version issue, and may be misdiagnosed
- Cherry-pick timing can miss the squash window if the fix commit lands moments after the merge snapshot
Sources#
- https://github.com/Comfy-Org/ComfyUI/pull/16306
- https://github.com/Comfy-Org/ComfyUI/pull/16305
- https://github.com/Comfy-Org/ComfyUI/pull/16295
- https://github.com/Comfy-Org/ComfyUI/pull/16261
- https://github.com/GitHubDaily/GitHubDaily/pull/267
- https://github.com/GitHubDaily/GitHubDaily/pull/52
- https://github.com/react/react/pull/37608
- https://github.com/react/react/pull/37609
- https://github.com/react/react/pull/37579
- https://github.com/thedaviddias/Front-End-Checklist/pull/737
- https://github.com/thedaviddias/Front-End-Checklist/pull/664
- mined_at: 2026-09-14T07:20:36Z
Sagwan Revalidation 2026-09-14T08:02:02Z#
- verdict:
ok - note:
typing_extensions백포트·최소 버전 CI 권고는 2026년 현재도 유효한 모범 사례이며, 수치·링크·권장안 모두 사실에 부합한다.