Changes by Ezio Melotti ezio.melo...@gmail.com:
--
assignee: - ezio.melotti
resolution: - fixed
stage: commit review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17323
Roundup Robot added the comment:
New changeset 367167f93c30 by Ezio Melotti in branch 'default':
#17323: The [X refs, Y blocks] printed by debug builds has been disabled by
default. It can be re-enabled with the `-X showrefcount` option.
http://hg.python.org/cpython/rev/367167f93c30
Ezio Melotti added the comment:
Attached a new patch that addresses a couple of minor things pointed out in the
reviews.
--
stage: patch review - commit review
Added file: http://bugs.python.org/file29562/issue17323-3.diff
___
Python tracker
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
nosy: +loewis
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17323
___
___
Python-bugs-list
Ezio Melotti added the comment:
Attached updated patch with docs and tests.
I changed the function to do the equivalent of if
sys._xoptions.get('showrefcount', False): as proposed in msg183608.
Adding -X showrefcount to non-debug builds could be covered in a separate issue.
Cleaning up the test
Ezio Melotti added the comment:
If this is done, it should probably be on by default on all
--with-pydebug buildbots.
With on by default you mean that the output should be disabled or enabled?
Otherwise I suspect nobody will _ever_ look at its output and we
should just remove the feature
Gregory P. Smith added the comment:
If this is done, it should probably be on by default on all --with-pydebug
buildbots. Otherwise I suspect nobody will _ever_ look at its output and we
should just remove the feature all together.
Being off in the main process on the build bots would still
Antoine Pitrou added the comment:
_Py_GetRefTotal() wouldn't be available in non-debug builds IIRC.
--
nosy: +pitrou
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17323
___
Ezio Melotti added the comment:
Yes -- I was proposing to make it available on non-debug builds too, unless it
has a negative impact on the performance or other similar issues.
--
___
Python tracker rep...@bugs.python.org
Ezio Melotti added the comment:
Here's a proof of concept that defines a new _print_total_refs() function and
calls it through the PRINT_TOTAL_REFS macro, disables printing the refs by
default, and adds a -X showrefcount option to reenable it. This can also be
achieved at runtime by
Brian Curtin added the comment:
I don't know exactly what the option would be called, but +1 on the idea.
Perhaps something under the interpreter's -X option since it's
implementation-specific?
This output gets in the way a fair bit when debugging interpreter sessions, and
Chris brings up a
New submission from Ezio Melotti:
I suggest to disable the [X refs, Y blocks] ouput in debug builds by default,
and provide an option to enable it if/when necessary.
Most of the time these values are not necessary, and they end up getting in the
way while copy/pasting code from the interpreter
Chris Jerdonek added the comment:
The refs output also complicates testing in some cases, e.g.
http://hg.python.org/cpython/file/bc4458493024/Lib/test/test_subprocess.py#l61
http://hg.python.org/cpython/file/bc4458493024/Lib/test/test_subprocess.py#l786
--
nosy: +chris.jerdonek
13 matches
Mail list logo