Skip to content

ci: promote free-threaded 3.14t to supported, with the GIL off (#1958) - #2024

Closed
JarryShaw wants to merge 1 commit into
mainfrom
ci/1958-promote-314t
Closed

JarryShaw wants to merge 1 commit into
mainfrom
ci/1958-promote-314t

Conversation

@JarryShaw

Copy link
Copy Markdown
Owner

Please follow the guide below

What is the purpose of your pull request?

  • fix — corrects a defect
  • feat — adds a feature
  • perf — changes performance, not behaviour
  • refactor — changes neither behaviour nor performance
  • test — tests only
  • docs — documentation only
  • ci — workflows or build tooling
  • release — bumps the version or rolls up a distribution
  • chore — anything else

Description of your pull request and other information

#1958 phase 4. Stacked on #2006, so it lands after that one. GraalPy stays experimental, and this does not close #1958.

  • Tier: 3.14t becomes supported. load() accepts a supported free-threaded build only when its default build is also supported. builds() keeps 3.14t out of pypi, conda and engine-tests, because the cp314 wheel is pure Python and installs on 3.14t.
  • Legs: 3.14t moves from experimental.yml into test and integration and gains Compat Python 3.14t. The ruleset must add that context.
  • GIL off: the 3.14t legs set PYTHON_GIL=0 and uninstall lxml. lxml 6 declares no Py_mod_gil, and its maintainer reports crashes without the GIL (LP#2111289).
  • GIL guards: tests/_gil_guard.py and a conftest hook fail the first teardown that finds the GIL on, on a free-threaded build under Actions. The Compat leg fails if import pcapkit turns the GIL on.
  • Weekly job: it keeps hand-kept lines whatever their tier.
  • Tests: new tests/project/test_free_threaded_supported_1958.py. The existing tier and prose pins are updated, and the unit-tests.yml citations are re-derived.

@JarryShaw JarryShaw added ci Pull requests that change CI or workflow configuration (ci: subject prefix) review: pending No verdict for the current head - never reviewed, or the head moved since the last one labels Oct 21, 2026
@JarryShaw JarryShaw moved this to In review in PyPCAPKit Oct 21, 2026
@JarryShaw

Copy link
Copy Markdown
Owner Author

GOOD TO GO at ebb556642, reviewed as its own commit on top of #2006.

A Sonnet cross-review confirmed:

  • Empty PYTHON_GIL on other legs is harmless. CPython's _Py_GetEnv ignores an empty value, while PYTHON_GIL=0 on a non-free-threaded 3.14 refuses to start. So the empty-string fallback is the right one.
  • lxml. Its free-threading support only arrives in 7.0.0a1 ("Experimental"); stable is 6.1.3. Nothing in the 3.14t tiers needs lxml: the vendor parsers use html5lib and the tests gate on HAS_LXML.
  • The GIL guard runs in every xdist worker. The Compat verify step exits 0 on non-free-threaded builds.
  • Matrices. util/python_versions.py --github-output puts 3.14t in test, integration and compatibility, and leaves it out of pypi, conda, pypi-wheels and engine-supported.
  • Ruleset 23497679. It lists Required checks passed plus Compat Python 3.11 to 3.15, so Compat Python 3.14t is the only context to add. required-checks already needs test and integration.
  • Tests. The selected pins give 246 passed.

I'll add Compat Python 3.14t to the ruleset once this merges; adding it earlier would block every other PR on a check only this one reports. The new Integration Python 3.14t leg runs for the first time here and is worth watching.

@JarryShaw JarryShaw added review: good-to-go Cross-review at the current head says ready; CI state is separate and removed review: pending No verdict for the current head - never reviewed, or the head moved since the last one labels Oct 21, 2026
@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Coverage: 91.54% (unit tier, Python 3.15, e2d2af916, Unit Tests run success)

Package Statements Missed Branches Partial Cover
pcapkit (top level) 104 4 20 2 95.16%
pcapkit/const 19597 881 2618 867 92.11%
pcapkit/corekit 2567 71 816 37 96.57%
pcapkit/dumpkit 282 3 102 3 98.44%
pcapkit/foundation 2930 23 1022 25 98.79%
pcapkit/interface 138 4 52 3 96.32%
pcapkit/protocols 17436 219 4582 185 98.15%
pcapkit/toolkit 872 36 298 10 95.21%
pcapkit/utilities 529 7 160 5 98.26%
pcapkit/vendor 4431 1995 1018 167 51.73%

Per-file detail: the coverage-html artifact of this run.

@JarryShaw JarryShaw added review: needs-changes Cross-review at the current head says changes are required; see the verdict comment and removed review: good-to-go Cross-review at the current head says ready; CI state is separate labels Oct 21, 2026
@JarryShaw
JarryShaw force-pushed the ci/1958-promote-314t branch from ebb5566 to e2d2af9 Compare October 21, 2026 22:57
@JarryShaw

Copy link
Copy Markdown
Owner Author

GOOD TO GO at e2d2af916.

The 3.15 failure in test_conda_platform_pin_refresh_1851 was caused by this PR, and the fix is a real one.

  • Cause: util/conda_vendor.py's conda_pythons() read the whole supported tier, so it now included 3.14t. --refresh-pins then wanted a cp314t wheel for a conda build that doesn't exist, and left the pin where it was.
  • Fix: it now uses builds(), the same list as the conda output, which excludes free-threaded builds.

A Sonnet re-review of the delta confirmed:

  • the change is only conda_vendor.py plus a new test;
  • conda_pythons() returns 3.11–3.15 with no 3.14t;
  • nothing else reads the supported tier in a way that 3.14t breaks;
  • the new test fails on ebb556642;
  • the related files give 99 passed.

That the pin stayed put while the run exited 0 is a separate, pre-existing gap, filed on its own.

@JarryShaw JarryShaw added review: good-to-go Cross-review at the current head says ready; CI state is separate and removed review: needs-changes Cross-review at the current head says changes are required; see the verdict comment labels Oct 21, 2026
@JarryShaw

Copy link
Copy Markdown
Owner Author

Ordering check, since the "Plain unittest ordering" job is skipped on PRs. I ran every leg of it, sequentially and with CI's own command, on main 185b3176f + #2024 (which contains this PR's two commits).

The KTLO legs report 0 failing test ids across 15 legs.

- python-versions.toml: 3.14t is supported. util/python_versions.py lets a
  free-threaded build be supported beside its default build (hand-kept, after
  the computed versions) and keeps it out of pypi, conda and engine-tests via
  builds(): 3.14's pure-Python wheel is the one it installs.
- unit-tests.yml: 3.14t joins `test` and `integration` (out of
  experimental.yml) with PYTHON_GIL=0, and its install uninstalls lxml, which
  needs the GIL on lxml 6.
- tests/_gil_guard.py + conftest: on a free-threaded build under Actions, fail
  the first teardown that finds the GIL on.
- python-compatibility.yml: `Compat Python 3.14t`; Verify package fails where
  importing pcapkit turns the GIL on.
- update_python_versions.py keeps hand-kept lines whatever their tier; the
  Compat rows and spans cover 3.14t, the classifiers do not.
- Docs: workflows.rst describes the promotion; unit-tests.yml citations
  re-derived.

Tests: new tests/project/test_free_threaded_supported_1958.py; tier, matrix
and prose pins updated.
@JarryShaw
JarryShaw force-pushed the ci/1958-promote-314t branch from e2d2af9 to 8695757 Compare October 22, 2026 02:01
@JarryShaw
JarryShaw marked this pull request as ready for review October 22, 2026 02:06
@JarryShaw

Copy link
Copy Markdown
Owner Author

#2006 landed as 609bd9370, so I rebased this onto it as 8695757e2, keeping only the 3.14t commit. The tree is byte-identical to e2d2af916, so the earlier verdict and ordering run still hold. Out of draft. It will conflict with #2023 in python-compatibility.yml and workflows.rst once either lands; I'll rebase the second one.

@JarryShaw

Copy link
Copy Markdown
Owner Author

Closing per the 02:05Z ruling on #1967: 3.14t stays experimental, and lxml may turn the GIL on there. That removes every part of this PR: the promotion, the GIL guard, the lxml uninstall, Compat Python 3.14t and the ruleset change. The conda_vendor fix mattered only with 3.14t supported. #2025 is unblocked. The branch stays if this comes back.

@JarryShaw JarryShaw removed the review: good-to-go Cross-review at the current head says ready; CI state is separate label Oct 22, 2026
@JarryShaw JarryShaw closed this Oct 22, 2026
@github-project-automation github-project-automation Bot moved this from In review to Done in PyPCAPKit Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Pull requests that change CI or workflow configuration (ci: subject prefix)

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

ci: categorise the tests into tiers and run each tier where it belongs

1 participant