-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
Closed as not planned
Closed as not planned
Copy link
Labels
3.12only security fixesonly security fixes3.13bugs and security fixesbugs and security fixesOS-windowstype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
In #104826 (backported to 3.12 in #105277) to fix #104690 disallowed creating new threads during interpreter finalization. This poses a problem on windows because the Popen._communicate
uses a thread (see matplotlib/matplotlib#27437 (comment) for discussion).
In Matplotlib we are holding onto a latex process and triggering this via a weakref finalize, but a minimal reproducer is:
from subprocess import Popen, PIPE
import atexit
# anything that holds stdin and stdout should work
proc = Popen(['powershell'], stdin=PIPE, stdout=PIPE)
def cleanup():
print('hi bob')
proc.kill()
proc.communicate()
atexit.register(cleanup)
xref matplotlib/matplotlib#27437
CPython versions tested on:
3.12
Operating systems tested on:
Windows
mdboom and gpshead
Metadata
Metadata
Assignees
Labels
3.12only security fixesonly security fixes3.13bugs and security fixesbugs and security fixesOS-windowstype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error