-
-
Notifications
You must be signed in to change notification settings - Fork 31.1k
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
Print warning at shutdown if gc.garbage not empty #35458
Comments
Here are comments from Guido, taken from a patch """ In that same discussion, I realized that the module The point to #1 is that we let objects in unreachable |
Although this dates back to 2001, I think this might still be useful. |
Displaying the full list may be unwieldy if it's very large. Instead, we could by default display the following kind of message: Python warning: 5 uncollectable objects remaining at interpreter shutdown. Use gc.DEBUG_UNCOLLECTABLE to list them. And list gc.garbage only if gc.DEBUG_UNCOLLECTABLE is defined. |
Here is a patch. Perhaps I should add tests too. |
New patch with tests. |
More thorough tests. |
Patch looks basically OK on an eyeball scan. A couple of suggestions:
|
After a quick grep, it seems script_helper is really in the minority
Ah, indeed. Thanks! |
Here is a new patch with doc. |
I went forward and committed the patch in r83861. |
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: