-
Notifications
You must be signed in to change notification settings - Fork 63
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
Freeze when closing handle from __del__ during python exit #56
Comments
This is a known Python behavior. Example alternative: https://www.quora.com/Python-My-class-defines-del__-but-it-is-not-called-when-I-delete-the-object |
The problem wasn't that the |
Makes sense. |
No issue here under Windows 10 with latest git.
|
@Ariakenom Maybe you can test with the latest git and up-to-date Python 3 versions. |
|
I know. But please look at my run log, I have the 'del c' in the run log. |
It's not supposed to be in the run log. That's why the statement is commented out. With a comment that says that it works as expected if we run the statement. But without it it does not work as expected and we get the freeze. |
Thanks for the clarification. But it does not freeze for me.
|
Without using the interactive session:
|
@Ariakenom Maybe you want to try again with more recent Python version to see if there is a real issue or not. Thanks. |
I can reproduce the issue with Python 3.6.8 64bit, Python 3.7.9 64bit and Python 3.8.10 64bit.
|
I tried to add a
__del__
method for cleanup but it freezes if python exits while the object is alive.Python 3.6.3 (v3.6.3:2c5fed8, Oct 3 2017, 17:26:49) [MSC v.1900 32 bit (Intel)] on win32
pywinusb 0.4.2
The text was updated successfully, but these errors were encountered: