Skip to content

Conversation

@ngoldbaum
Copy link
Contributor

@ngoldbaum ngoldbaum commented Sep 15, 2025

Currently, the free-threaded tests don't actually run any tests.

The Mac builds die because of a check that was added in pytest-run-parallel 0.6.0 to fail the tests if the GIL is enabled at runtime. This happens on Mac right now (see here).

The Linux and Windows free-threaded tests don't actually run any tests (see here), because pytest-run-parallel detects that all the tests use the recwarn fixture via the global _no_warnings fixture. Because warnings aren't thread-safe in Python 3.13, this means that no tests run in parallel on Python 3.13.

This is fixed in Python 3.14 and I can re-add pytest-run-parallel testing using 3.14t once #1128 is fixed.

I think at one point these tests did something more useful (although I bet they were flaky because of the global use of the recwarn fixture in all tests), but because the freethreading_tests.yml workflow doesn't use pinned versions, all of that has bitrot as pytest-run-parallel has done some releases.

For now, I think it's best to just delete all the infrastructure that was added back in #1106. Given the way the global warnings filter is implemented, I don't think it's possible to safely run the tests in parallel under 3.13t without changing that.

I was able to unify all the tests into one CI configuration file, since setup-python supports the free-threaded build there's no need to use uv to install a free-threaded interpreter.

For more information about the thread-safety fixes for warnings that are enabled by default in 3.14t, see https://docs.python.org/3.14/whatsnew/3.14.html#concurrent-safe-warnings-control.

@ngoldbaum ngoldbaum changed the title Fixup ft support Disable pytest-run-parallel testing for now and re-enable CI for 3.13t Sep 15, 2025
@BoboTiG BoboTiG merged commit 21a64ee into gorakhargosh:master Sep 15, 2025
18 of 24 checks passed
TobiasRzepka pushed a commit to TobiasRzepka/watchdog that referenced this pull request Oct 11, 2025
…or 3.13t (gorakhargosh#1129)

* unify test.yml and freethreading_tests.yml

* Delete unnecessary thread-unsafe markers

* remove pytest-run-parallel CI
TobiasRzepka pushed a commit to TobiasRzepka/watchdog that referenced this pull request Oct 11, 2025
…or 3.13t (gorakhargosh#1129)

* unify test.yml and freethreading_tests.yml

* Delete unnecessary thread-unsafe markers

* remove pytest-run-parallel CI
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