cpython
cpython copied to clipboard
bpo-33257: Fix race conditions for non-threaded Tcl
https://bugs.python.org/issue33257
Comments on decisions:
- Placed reentrant lock logic directly into Tkinter 'cuz reentrant locks aren't used anywhere else, and this is easier than overhauling all 4 PyThread lock implementations. (They're also based on condition variables which don't support reentrance.)
- Pushed both fixes to the same PR 'cuz the test case based on TkinterHanders3.py detects both bugs and would fail CI otherwise
- Reentry count overflow check can probably be replaced by an
assert
: unless there's a bug, we'll sooner hit RecursionError or MemoryError.
Test case has code nonportable to Py2. Shall I make it portable or compose a backport by hand?
Test failures on MacOS in acyncio
are caused by https://bugs.python.org/issue33531 .
GH-6972 is a backport of this pull request to the 2.7 branch.
I removed the " needs backport to 3.6" label, the 3.6 branch no longer accept bugfixes (only security fixes are accepted): https://devguide.python.org/#status-of-python-branches
This PR is stale because it has been open for 30 days with no activity.