Skip to content

Enable free-threading - #1033

Merged
Marc-Antoine Schmidt (MarcAntoineSchmidtQC) merged 8 commits into
mainfrom
ci/free-threading
Nov 19, 2026
Merged

Marc-Antoine Schmidt (MarcAntoineSchmidtQC) merged 8 commits into
mainfrom
ci/free-threading

Conversation

@jtilly

@jtilly Jan Tilly (jtilly) commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

Same idea as Quantco/tabmat#557.

  • Declare the Cython extensions freethreading_compatible (requires Cython>=3.1).
  • Stop skipping free-threaded wheels (removes the *t-* skip from the cibuildwheel config, so cp314t is built), including on Windows.
  • Add a py314t pixi environment (requiring tabmat>=4.3.1, the first free-threading compatible release), a CI job for it, and a check that importing glum does not re-enable the GIL.

The py314t tests run without -X gil=0: if any import re-enabled the GIL, Python would emit a RuntimeWarning, which fails the tests since warnings are treated as errors.

Verified locally (macOS): importing glum leaves the GIL disabled, and the full test suite passes in py314t (2177 tests).

Left to CI: the py314t job and the free-threaded wheel builds, in particular Windows (/openmp), where the previous cp314t-win* skip is removed.


📚 Docs preview: https://glum--1033.org.readthedocs.build/en/1033/ (built from 26a35a6)

@jtilly
Jan Tilly (jtilly) marked this pull request as draft November 4, 2026 20:25
Base automatically changed from ci/modernize-cibuildwheel to main November 5, 2026 01:50
Jan Tilly (jtilly) and others added 4 commits November 17, 2026 13:03
Require tabmat>=4.3.1 in py314t and run its tests without -X gil=0, so that
an import re-enabling the GIL fails the tests via warnings-as-errors.
@jtilly
Jan Tilly (jtilly) marked this pull request as ready for review November 17, 2026 12:16

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@MarcAntoineSchmidtQC
Marc-Antoine Schmidt (MarcAntoineSchmidtQC) merged commit ca2d717 into main Nov 19, 2026
30 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.

2 participants