Skip to content

Avoid parallel execution of the recursion-limit nesting test on free-threaded builds - #729

Merged
methane merged 2 commits into
mainfrom
copilot/fix-failing-github-actions-job
Aug 26, 2026
Merged

Avoid parallel execution of the recursion-limit nesting test on free-threaded builds#729
methane merged 2 commits into
mainfrom
copilot/fix-failing-github-actions-job

Conversation

Copilot AI commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

The Windows Python 3.15t Actions job was failing in the pure-Python fallback test phase under pytest-run-parallel. The failure came from test_nest_limit_1024, which mutates the process-wide recursion limit and can race when multiple iterations run concurrently.

  • Root cause

    • test_nest_limit_1024 temporarily raises and restores sys.setrecursionlimit(...).
    • In free-threaded parallel runs, concurrent executions can observe or restore the wrong recursion limit, surfacing as intermittent StackError failures during unpacking.
  • Change

    • Mark test_nest_limit_1024 as thread_unsafe so pytest-run-parallel runs it single-threaded while leaving the rest of the free-threaded suite parallelized.
  • Scope

    • No production code changes.
    • No workflow changes.
    • Test still runs in normal serial execution; only threaded-parallel scheduling changes.
@pytest.mark.skipif(IS_FREE_THREADED_BUILD, reason="Skipped on free-threaded build")
@pytest.mark.thread_unsafe
def test_nest_limit_1024():
    ...

Co-authored-by: methane <199592+methane@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix failing GitHub Actions job "Run test with Python 3.15t on windows-latest" Avoid parallel execution of the recursion-limit nesting test on free-threaded builds Aug 26, 2026
Copilot AI requested a review from methane August 26, 2026 11:29
@methane
methane marked this pull request as ready for review August 26, 2026 12:25
@methane
methane merged commit d374a17 into main Aug 26, 2026
53 checks passed
@methane
methane deleted the copilot/fix-failing-github-actions-job branch August 26, 2026 12:26
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