Skip to content

DM-56905: Fix Periodic CI for Sphinx dev dropping Python 3.12 - #553

Merged
jonathansick merged 6 commits into
mainfrom
tickets/DM-56905
Nov 10, 2026
Merged

jonathansick merged 6 commits into
mainfrom
tickets/DM-56905

Conversation

@jonathansick

Copy link
Copy Markdown
Member

Summary

The weekly Periodic CI run has failed since 2026-10-26 (runs 40374010460, 41526175906, 42705867116) in the test (3.12, dev) cell, at the Run nox step:

error: No solution found when resolving dependencies
  cause: Because the current Python version (3.12.16) does not satisfy Python>=3.13
         and sphinx==9.3.0 depends on Python>=3.13, we can conclude that sphinx==9.3.0 cannot be used.

Root cause: Sphinx's main branch dropped Python 3.12 on 2026-10-20 (sphinx-doc/sphinx#14762; main is now 9.3.0 development with requires-python = ">=3.13"). The dev sessions install Sphinx from git, so that override can no longer be installed on Python 3.12. Because the matrix used the default fail-fast, that one cell also cancelled the other 11 cells every week.

Changes

  • Skip the Sphinx dev sessions on Python 3.12 (noxfile.py), and exclude the 3.12 / dev cell from the Periodic CI matrix (.github/workflows/ci-cron.yaml). Sphinx 8 and 9 are still tested on Python 3.12. The floor is a single _SPHINX_DEV_MIN_PYTHON constant in the noxfile.
  • Set fail-fast: false on the Periodic CI test matrix so one broken cell no longer hides the rest.
  • Update dependencies with make update-deps (uv.lock, ruff and prettier prek hooks). That update surfaced three more problems, fixed here:
    • tomlkit 0.15.2 serializes an empty array of tables as affiliations = [] (0.15.1 and earlier omitted it). Documenteer added an empty affiliations array to every author table it touched, so technote sync-authors stopped being a byte-for-byte no-op on a healthy file (tests/services/technoteauthor_test.py::test_sync_authors_leaves_a_healthy_file_byte_identical). src/documenteer/storage/technotetoml.py now only creates the array when there is an affiliation to add. This is a user-facing fix, since tomlkit is unpinned for PyPI installs.
    • sphinx-autodoc-typehints 3.14 and later import sphinx.ext.autodoc._dynamic, which Sphinx 8 doesn't have. The nox sessions overrode Sphinx but kept the locked sphinx-autodoc-typehints (3.17.5, resolved for Sphinx 9), so 94 tests failed or errored in the Sphinx 8 sessions. The override now installs sphinx-autodoc-typehints in the same uv pip install as Sphinx, so the resolver picks a release that supports that Sphinx (3.5.2 for Sphinx 8; the locked release is kept for Sphinx 9 and dev).
    • ruff 0.17 newly reports ISC004 and ICN001 (datetime as dt) and formats imports with trailing pragma comments differently. The code is fixed to comply; no rules were ignored.
  • Changelog fragment and a note in docs/dev/development.rst.

Validation

Run locally (macOS) against the updated lockfile with uv run --only-group=nox nox -s ...:

  • test, typing, and demo for 3.12(sphinx='dev'): skipped with an explanatory message (previously failed at dependency resolution, reproduced locally).
  • test, typing, and demo for Sphinx dev on Python 3.13, 3.14, and 3.15: pass.
  • test, typing, and demo for 3.13(sphinx='8'), 3.13(sphinx='9'), and 3.12(sphinx='9'); test-3.12(sphinx='8'), typing-3.12(sphinx='8'), and test-3.15(sphinx='8'): pass.
  • lint, docs, and packaging: pass.

The Periodic CI workflow itself only runs on a schedule or by manual dispatch, so the dev cells aren't exercised by this pull request's checks. It can be run against this branch with gh workflow run ci-cron.yaml --ref tickets/DM-56905.

Run make update-deps: refresh uv.lock and bump the ruff and prettier
prek hooks.
Ruff 0.17 newly reports ISC004 (implicit string concatenation in a
collection must be parenthesized) and ICN001 for datetime (import as
dt) under select = ALL, and its formatter no longer wraps an import
to make room for a trailing pragma comment.
Updating an author table added an empty affiliations array of tables
even for an author with no affiliations. tomlkit 0.15.1 and earlier
omitted an empty array of tables on output, but 0.15.2 serializes it
as affiliations = [], so sync-authors rewrote otherwise healthy
technote.toml files. Only create the array when there is an
affiliation to add.
Sphinx's main branch (9.3.0 development) now requires Python 3.13, so
the Sphinx dev override can't be installed on Python 3.12 and that
cell of the Periodic CI matrix failed at dependency resolution every
week. Skip the dev sessions on Pythons older than Sphinx's floor and
exclude the cell from the Periodic CI matrix.

Also turn off fail-fast for the Periodic CI test matrix so that one
broken cell no longer cancels, and hides the results of, the others.
The test, typing, and demo sessions install a Sphinx version over the
locked environment but left the locked sphinx-autodoc-typehints in
place. That release is resolved for Sphinx 9, and since 3.14 it
imports sphinx.ext.autodoc._dynamic, which Sphinx 8 doesn't have, so
every guide build failed in the Sphinx 8 sessions once the lockfile
moved past 3.13. Install the extension in the same uv pip install as
Sphinx so the resolver picks a release that supports that Sphinx.
@github-actions

Copy link
Copy Markdown

Documentation preview

Edition URL
DM-56905 https://documenteer.lsst.io/v/DM-56905/

Build 1xxx-n490-4p9f-65 processed successfully.

@jonathansick
jonathansick merged commit 2cc8df0 into main Nov 10, 2026
15 checks passed
@jonathansick
jonathansick deleted the tickets/DM-56905 branch November 10, 2026 19:46
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