Repository navigation
Conversation
|
The following commit authors need to sign the Contributor License Agreement: |
|
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
8731f40 to
526dfe8
Compare
Documentation build overview
|
|
Thanks for the patch. I was planning to work on this issue, and I’ll take it from here. The proposed change fixes the reproducer, but unconditional context propagation also changes downstream behavior. I want to think about compatibility questions and performance before settling on an implementation. I’m closing this PR to avoid parallel work; I’ll follow up on the issue. |
Fixes gh-159964.
Capture a copy of the submitting thread's context for each submitted task and execute the callable within that context. This prevents a task from inheriting stale context from whichever worker happened to start first and keeps context-variable rebinding in one task isolated from subsequent tasks.
The change includes a regression test for context propagation across reused workers, documentation, and a NEWS entry.
Validation: lint and the C API documentation check pass. The full CI matrix is running; the local CPython test suite could not be run in this environment.