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
Rework Python finalization #65987
Comments
Hi, During the development of Python 3.4, I tried to emit warnings if a file is destroyed without being explicitly closed. The warnings were not emited in threads during Python finalization. Here are related changes:
The change bpo-19466 had to be reverted a few days before the release of Python 3.4.0 because it caused the regression bpo-20526. I'm still not convinced that bpo-20526 was a new bug. IMO the bug still exists, but it is just less likely without the change bpo-19466. There is still something wrong in Python finalization, so I open this issue to rework it. The goal is to get warnings in test_4_daemon_threads() of test_threading. I attached the test as a Python script. |
Benjamin changed ThreadState_DeleteCurrent() to fix an issue in this part of the code, but then reverted his change: (Yeah this part of the code is really tricky, likely to deadlock.) |
Charles-François Natali wrote a general comment about daemon threads: |
This issue was more a reminder for myself (TODO). I'm no more interesting to work on it, so I close it. The Python finalization is very fragile. I prefer to not touch it again :-p |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: