Add Python 3.14 to the test matrix - #1348
Open
brianegge wants to merge 2 commits into
Open
Conversation
brianegge
force-pushed
the
ci-python-3.14
branch
from
August 21, 2026 15:48
e88047e to
fb9743e
Compare
Extend the PR test matrix to cover Python 3.14 and declare it in the package classifiers, mirroring the python-compat job in morganstanley/hobbes which already spans 3.10 through 3.14. To keep the job count in check, the `[all]` extras combination on ubuntu is excluded for 3.13 as it already is for 3.11 and 3.12, so `[all]` continues to run against the oldest and newest supported interpreter (3.10 and 3.14). Windows keeps `[all]` on every version. Net change is +2 jobs (10 -> 12). Also move the `return` in `run_exporter` out of its `finally` block. Python 3.14 emits a SyntaxWarning for this construct -- it was the only such warning in the codebase -- and returning from `finally` silently discarded any BaseException (e.g. KeyboardInterrupt) raised while an exporter was running. Verified against 3.14 locally: dependencies resolve to the same versions as on 3.13 with no fallbacks, and tests/unit is at parity (1024 passed on 3.12, 3.13 and 3.14 alike). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GWfe48Svf5j2TtgrryJfBK
brianegge
force-pushed
the
ci-python-3.14
branch
from
August 21, 2026 15:51
fb9743e to
baae781
Compare
…gge.rst `test_basic_loose` asserted that the test process has no child processes at all once the plan has torn down. That holds only while nothing else in the interpreter has touched multiprocessing: the `resource_tracker`, and under forkserver the server process itself, are children of the interpreter and live for its lifetime. Python 3.14 changes the default start method on Linux from fork to forkserver, so those helpers are now routinely present. `doit test` runs the whole suite in a single pytest process, so `test_resource_monitor.py` -- which uses `multiprocessing.Manager()` and `Process` -- leaves behind a resource_tracker and a forkserver zombie, and every `test_basic_loose` parametrisation that runs afterwards then fails with `assert 2 == 0`. The assertion is about the App driver's own processes being reaped, so it now compares against a snapshot taken before the plan runs rather than requiring an empty child list. Verified on Linux in python:3.14-slim and python:3.13-slim containers. Running test_resource_monitor.py and test_bad_app.py in one pytest process, as CI does, went from 5 failed to 8 passed on 3.14 and stays at 8 passed on 3.13; test_bad_app.py alone is 7 passed on both. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GWfe48Svf5j2TtgrryJfBK
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.
Summary
Extends the PR test matrix to cover Python 3.14, mirroring the
python-compatjob in morganstanley/hobbes, which already spans['3.10', '3.11', '3.12', '3.13', '3.14'].Testplan turns out to need essentially nothing to run on 3.14 — this PR is the matrix entry, the classifier, and one small code fix.
Changes
.github/workflows/test_pr.yml— add'3.14'to thepython-versionmatrix.pyproject.toml— add theProgramming Language :: Python :: 3.14classifier.testplan/common/exporters/__init__.py— move thereturninrun_exporterout of itsfinallyblock.Job count
To stop the matrix growing,
[all]on ubuntu is now excluded for 3.13 as it already is for 3.11 and 3.12.[all]therefore keeps running against the oldest and newest supported interpreter (3.10 and 3.14); Windows keeps[all]on every version. Net change is 10 → 12 jobs.The
finallyfixrun_exporterended withreturn exp_resultinside itsfinally:block. Python 3.14 emits aSyntaxWarningfor this construct, and it was the only such warning in the codebase. It is also a latent bug independent of the version bump: returning fromfinallysilently discards any in-flightBaseException, so aKeyboardInterruptraised while an exporter was running was swallowed rather than propagated. Thetry/except Exceptionclauses above already handle every ordinary error path, so normal behaviour is unchanged.Verification
Tested locally on macOS (3.12/3.13/3.14) and in Linux containers (
python:3.13-slim/python:3.14-slim):pip install -e ".[all]" --group teston 3.12 / 3.13 / 3.14tests/uniton Linux 3.13tests/uniton Linux 3.14tests/uniton macOS 3.12 / 3.13 / 3.14SyntaxWarningscan overtestplan/on 3.14distutils,ByteString,typing.Text, …)multiprocessingstart methodWorth recording since it is the main behavioural change in 3.14: the default start method on Linux moves from
forktoforkserver, which I confirmed in-container (3.13 →fork, 3.14 →forkserver).testplan/monitor/resource.pybuildsmultiprocessing.Processobjects with bound-method targets and has comments that explicitly assume fork semantics, so this looked like a likely breakage — buttests/functional/testplan/test_resource_monitor.pypasses as-is underforkserver. No change was needed; flagging it only so the assumption is on record.Not covered
Windows on 3.14 is not something I could verify locally — that one is on CI to confirm.
constraints.txtis deliberately untouched. Theuv-exportpre-commit hook re-resolves it on every commit and currently produces ~150 lines of unrelated dependency churn, becausereleaseheraldis pinned to a movingmainrev. That drift is independent of this change and does not belong in this PR.🤖 Generated with Claude Code
https://claude.ai/code/session_01GWfe48Svf5j2TtgrryJfBK