[issue477863] Print warning at shutdown if gc.garbage not empty

2022-04-10 Thread admin


Change by admin :


--
github: None -> 35458

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue477863] Print warning at shutdown if gc.garbage not empty

2010-08-08 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

I went forward and committed the patch in r83861.

--
resolution:  - fixed
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue477863
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue477863] Print warning at shutdown if gc.garbage not empty

2010-08-04 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

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.

--
versions:  -Python 2.7

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue477863
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue477863] Print warning at shutdown if gc.garbage not empty

2010-08-04 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

Here is a patch. Perhaps I should add tests too.

--
keywords: +patch
Added file: http://bugs.python.org/file18374/gc_fini.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue477863
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue477863] Print warning at shutdown if gc.garbage not empty

2010-08-04 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


Removed file: http://bugs.python.org/file18374/gc_fini.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue477863
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue477863] Print warning at shutdown if gc.garbage not empty

2010-08-04 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
stage: needs patch - patch review
Added file: http://bugs.python.org/file18375/gc_fini.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue477863
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue477863] Print warning at shutdown if gc.garbage not empty

2010-08-04 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

New patch with tests.

--
Added file: http://bugs.python.org/file18378/gc_fini.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue477863
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue477863] Print warning at shutdown if gc.garbage not empty

2010-08-04 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


Removed file: http://bugs.python.org/file18375/gc_fini.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue477863
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue477863] Print warning at shutdown if gc.garbage not empty

2010-08-04 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

More thorough tests.

--
Added file: http://bugs.python.org/file18379/gc_fini2.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue477863
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue477863] Print warning at shutdown if gc.garbage not empty

2010-08-04 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
nosy: +gvanrossum, ncoghlan

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue477863
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue477863] Print warning at shutdown if gc.garbage not empty

2010-08-04 Thread Nick Coghlan

Nick Coghlan ncogh...@gmail.com added the comment:

Patch looks basically OK on an eyeball scan. A couple of suggestions:

- use test.script_helper.run_python rather than rolling your own run_command 
(or, at least, just make run_command a thin wrapper around run_python). I've 
been trying to trim down the number of different ways the test suite launches 
interpreter subprocesses for testing purposes, and script_helper also does a 
bit of extra cleanup to try to eliminate false alarms regarding reference 
leaks. That said, I do like the way you're checking that the output went to the 
correct stream, so perhaps instead add a run_python variant to script_helper 
that returns a 3-tuple containing the exit code, stdout and stderr and make 
your run_command a wrapper around that (then create an issue to migrate the 
rest of the script_helper.run_python based tests to switch to the new version 
so they will also check that the output is on the correct stream rather than 
lumping the two streams together).

- update the description of gc.DEBUG_UNCOLLECTABLE in the docs to specifically 
mention that the complete list of uncollectable objects will also be printed at 
interpreter shutdown.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue477863
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue477863] Print warning at shutdown if gc.garbage not empty

2010-08-04 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

 - use test.script_helper.run_python rather than rolling your own
 run_command (or, at least, just make run_command a thin wrapper around
 run_python). I've been trying to trim down the number of different
 ways the test suite launches interpreter subprocesses for testing
 purposes, and script_helper also does a bit of extra cleanup to try to
 eliminate false alarms regarding reference leaks.

After a quick grep, it seems script_helper is really in the minority
(it's only used in three test files) while ad hoc calls to subprocess
with sys.executable are all over the place. I'd rather open a separate
feature request for that new script_helper function than convert all
uses of subprocess in this issue.

 - update the description of gc.DEBUG_UNCOLLECTABLE in the docs to
 specifically mention that the complete list of uncollectable objects
 will also be printed at interpreter shutdown.

Ah, indeed. Thanks!

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue477863
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue477863] Print warning at shutdown if gc.garbage not empty

2010-08-04 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

Here is a new patch with doc.

--
Added file: http://bugs.python.org/file18394/gc_fini3.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue477863
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue477863] Print warning at shutdown if gc.garbage not empty

2010-03-17 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
stage:  - needs patch
title: New gc work - Print warning at shutdown if gc.garbage not empty
versions: +Python 3.2 -Python 3.1

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue477863
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com