Skip to content

Test ordering error with free-threaded builds #159293

Closed

Description

@freakboy3742

Bug report

Running the Python test suite on macOS on Linux in single-process, non-randomised order, using a free-threaded build, generates test failures - the tests:

  • test.test_functools.TestLRUPy.test_lru_recursion
  • test_pickle (68 failures)

all raise RecursionError. The failures are not seen if you run each test in isolation, or if you run the test suite in multi-process mode.

Reproduction:

$ configure --disable-gil
$ make
$ ./python.exe -m test --fast-ci --single-process --no-randomize

I found these failures while trying to set up a free threading build for iOS.

CPython versions tested on:

CPython main branch

Operating systems tested on:

macOS

Linked PRs

Activity

  1. freakboy3742 commented on Oct 13, 2026

    @freakboy3742
    ContributorAuthor

    For posterity - a simplified reproduction case (extracted from #159293) is:

    ./python.exe -m test --single-process --no-randomize test_free_threading test_functools test_pickle
    
  2. added a commit that references this issue on Oct 14, 2026
  3. added 2 commits that reference this issue on Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions