Repository navigation
ci: fix the three failures that have kept main red since July - #9
Merged
Merged
Conversation
CI on main last passed 2026-01-30. The July 20 run failed and nothing has run since, so both of these predate any recent change. Neither is a code defect; both are dependency drift. Distribution build: `twine check --strict` rejected the wheel with "'2.5' is not a valid metadata version". Hatchling emits Metadata-Version 2.5 for a PEP 639 SPDX license, and the Twine 6 bundled in build-and-inspect-python-package v2 does not know it. v3.0.0 bundles Twine 7, which does -- named in its release notes. Pinned to the full v3.0.1 because v3 deliberately stopped force-tagging majors. Confirmed the cause by building the unmodified package locally: Metadata-Version 2.5 is emitted regardless of which license is declared, and a current Twine passes it. Format: mypy failed inside numpy's own stubs -- "Type statement is only supported in Python 3.12 and greater". The cause was four disagreeing Python floors in one repo: requires-python said >=3.11, mypy said 3.10, pylint said 3.10, and the CI matrix tested 3.10. Aligned them, with one deliberate exception. pylint and the matrix now say 3.11, which is what requires-python says. mypy says 3.12, which is higher than our floor, because numpy's stubs use PEP 695 syntax that mypy cannot parse below 3.12 -- verified by running mypy at 3.11 and 3.12 against current numpy and zarr. Pinning numpy back instead just moves the failure into zarr's source, which uses 3.12 type-parameter lists. The cost of that exception, stated because it is real: mypy no longer verifies 3.11 compatibility. Ruff covers the syntax floor -- it infers target-version from requires-python -- and pylint is pinned to 3.11 explicitly. If verifying 3.11 in the type checker matters more than checking against current dependencies, the alternative is raising requires-python to >=3.12, which is a user-facing decision rather than a CI one.
Third pre-existing failure on this branch, and the one that took all eight matrix jobs down identically: pytest exited 4 during collection, before any test ran. tests/conftest.py imported testcontainers.mysql, which now emits "testcontainers.mysql is deprecated, use testcontainers.community.mysql instead". pyproject sets filterwarnings = ["error"], so that DeprecationWarning became an ImportError while loading conftest. Moved to testcontainers.community.mysql, which the pinned testcontainers>=4.14.0 already provides -- verified by importing it under warnings-as-errors. Suppressing the warning would also have worked, and there is precedent two lines up in the same filterwarnings list for a different testcontainers deprecation. Fixing the import is better: the deprecation names its own replacement, and the old module will be removed eventually. An ignore would defer the same work to whoever hits the removal. Not caused by the matrix change in this branch. Every platform and both Python versions fail the same way, including 3.14, which was already in the matrix before it was touched.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CI on
mainlast passed 2026-01-30. The July 20 run failed and nothing has run since — so all three failures predate the license PR (#8) that surfaced them. None is a code defect; all three are dependency drift.Now green: 10 passing, 1 skipping (the PyPI publish, correctly gated on
release).1. Distribution build — Twine too old for metadata 2.5
twine check --strictrejected the wheel: "'2.5' is not a valid metadata version."Hatchling emits
Metadata-Version: 2.5for a PEP 639 SPDX license, and the Twine 6 bundled inbuild-and-inspect-python-package@v2doesn't recognise it. v3.0.0 bundles Twine 7, which does — stated in its release notes.Confirmed rather than inferred: building the unmodified package locally gives
Metadata-Version: 2.5/License-Expression: MIT, and current Twine (15.0.0) passes that same wheel. Independent of which license is declared, so #8 could not have caused it.Pinned to full
v3.0.1— v3 deliberately stopped force-tagging majors.2. Format — four disagreeing Python floors
mypy failed inside numpy's own stubs: "Type statement is only supported in Python 3.12 and greater."
requires-python>=3.11[tool.mypy] python_version3.103.12[tool.pylint] py-version3.103.11["3.10", "3.14"]["3.11", "3.14"]The matrix was testing 3.10, which the package declares unsupported.
Why mypy goes above our own floor. numpy's stubs use PEP 695
typestatements, unparseable by mypy below 3.12. Verified at both: 3.11 fails, 3.12 passes clean. Pinning numpy back only moves the failure intozarr's source, which uses 3.12 type-parameter lists.The cost, stated because it is real: mypy no longer verifies 3.11 compatibility. Ruff covers the syntax floor (inferred from
requires-python) and pylint is pinned to 3.11. The alternative — raisingrequires-pythonto>=3.12— is a user-facing decision, so it is not made here.3. Check matrix ×8 — a deprecation warning promoted to an error
All eight jobs failed identically, with pytest exiting 4 during collection, before any test ran.
tests/conftest.pyimportedtestcontainers.mysql, which now warns "testcontainers.mysql is deprecated, use testcontainers.community.mysql instead" — andfilterwarnings = ["error"]turned that into anImportErrorloading conftest.Moved to
testcontainers.community.mysql, which the pinnedtestcontainers>=4.14.0already provides; verified by importing under warnings-as-errors.Suppressing it would also have worked, and there is precedent two lines up in the same
filterwarningslist for a different testcontainers deprecation. Fixing the import is better: the deprecation names its replacement, and the old module will be removed eventually.Not caused by the matrix change here — every platform and both versions failed the same way, including 3.14, which was already in the matrix.
After this
Merge this, then #8 (the Apache-2.0 relicense), which should run green.
dj-photon-codecsanddj-figpack-codecshave no workflows at all — which is whydj-photon-codecs#1 reports "no checks reported." These two files are worth copying there once this lands,dj-figpack-codecsespecially: public, on PyPI, and about to be publicised.One caveat on that plan. The workflows are sound; a month unwatched was enough to accumulate three independent breakages. Copying them to two more repos multiplies the surface unless someone is actually reading the results.