-
-
Notifications
You must be signed in to change notification settings - Fork 30.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash when using typing and daemon threads #116514
Comments
|
What is |
It is a simplification of |
It's in the comment... sorry I missed that. |
Any idea why importing |
Possibly some new reference cycle gets created. Reminds me of #115874 though the symptom is different. |
Is there anything I can still help with? |
I used this example to reproduce the issue: from sys import stdin
from threading import Thread
def start_reading():
Thread(target=stdin.buffer.read, daemon=True).start()
start_reading() It still gives me:
So, now I think that this is a related to #113964 |
The code at the top is simplified as much as possible. So this doesn't result in an error without the other changes (which is kind of strange too): from sys import stdin
from threading import Thread
def read():
stdin.buffer.read()
Thread(target=read, daemon=True).start() |
This issue isn't so much about the interpreter crashing, but the fact that it crashes when I import |
This comment was marked as outdated.
This comment was marked as outdated.
It's a crash so it should be fixed. Hopefully someone will come along eventually and fix it, or other changes to the interpreter will fix this issue. |
Crash report
What happened?
When I run this code on Python 3.11 it runs fine, but if I import
typing_minimal
(ortyping
) inreader.py
I get this error:main.py:
reader.py:
typing_minimal.py:
I don't understand how this is even possible.
CPython versions tested on:
3.11
Operating systems tested on:
macOS, Windows
The text was updated successfully, but these errors were encountered: