Skip to content

Comments

ci: add free-threaded Python to CI#1098

Merged
henryiii merged 2 commits intopypa:mainfrom
henryiii:henryiii/ci/ft
Feb 24, 2026
Merged

ci: add free-threaded Python to CI#1098
henryiii merged 2 commits intopypa:mainfrom
henryiii:henryiii/ci/ft

Conversation

@henryiii
Copy link
Contributor

@henryiii henryiii commented Feb 23, 2026

Adding free-threaded Python. Adding a little to the test printout to make it easier to ensure the correct Python is being used.

@henryiii henryiii marked this pull request as ready for review February 23, 2026 22:43
@henryiii
Copy link
Contributor Author

Actually, since we are testing now, let's add the trove classifier, too. Will add in a second.

@henryiii
Copy link
Contributor Author

henryiii commented Feb 23, 2026

I added the classifier. I did do a quick stress test:

+@nox.session(python=["3.13t", "3.14t"])
+def testsft(session: nox.Session) -> None:
+    """
+    Run the tests multiple times in threads, stress test.
+    """
+    session.install(*nox.project.dependency_groups(PYPROJECT, "test"), "pytest-run-parallel")
+    session.install("-e.")
+
+    session.run(
+        "python",
+        "-m",
+        "pytest",
+        "--parallel-threads=2",
+        "--iterations=2",
+        *session.posargs,
+        env={"PYTEST_RUN_PARALLEL_VERBOSE": "1"},
+    )
+
+

That doesn't run quite a few tests due to monkeypatch not being threadsafe, and it fails on the musllinux tests, even though those have a monkey patch, so I guess it's running them in sequence (?), and due to caching, that causes an expected call to fail. So only test-related issues, packaging itself seems fine.

Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
@henryiii henryiii merged commit 65ed5e9 into pypa:main Feb 24, 2026
92 of 94 checks passed
@henryiii henryiii deleted the henryiii/ci/ft branch February 24, 2026 03:08
@ngoldbaum
Copy link

Thanks for handling this Henry!

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.

4 participants