Skip to content

ci: fix the three failures that have kept main red since July - #9

Merged
dimitri-yatsenko merged 2 commits into
mainfrom
ci/fix-red-main
Aug 21, 2026
Merged

dimitri-yatsenko merged 2 commits into
mainfrom
ci/fix-red-main

Conversation

@dimitri-yatsenko

@dimitri-yatsenko dimitri-yatsenko commented Aug 21, 2026 •

Copy link
Copy Markdown
Member

CI on main last 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 --strict rejected the wheel: "'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 doesn'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."

Setting Was Now
requires-python >=3.11 unchanged — the source of truth
[tool.mypy] python_version 3.10 3.12
[tool.pylint] py-version 3.10 3.11
CI matrix ["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 type statements, unparseable by mypy below 3.12. Verified at both: 3.11 fails, 3.12 passes clean. Pinning numpy back only moves the failure into zarr'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 — raising requires-python to >=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.py imported testcontainers.mysql, which now warns "testcontainers.mysql is deprecated, use testcontainers.community.mysql instead" — and filterwarnings = ["error"] turned that into an ImportError loading conftest.

Moved to testcontainers.community.mysql, which the pinned testcontainers>=4.14.0 already provides; verified by importing under warnings-as-errors.

Suppressing it 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 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-codecs and dj-figpack-codecs have no workflows at all — which is why dj-photon-codecs#1 reports "no checks reported." These two files are worth copying there once this lands, dj-figpack-codecs especially: 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.

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.
@dimitri-yatsenko dimitri-yatsenko changed the title ci: fix the two failures that have kept main red since July ci: fix the three failures that have kept main red since July Aug 21, 2026
@dimitri-yatsenko
dimitri-yatsenko merged commit dab091e into main Aug 21, 2026
11 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.

1 participant