This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: gc.collect prints debug stats incorrectly
Type: behavior Stage: resolved
Components: Interpreter Core Versions: Python 3.9, Python 3.8
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: methane Nosy List: chivay, methane, ned.deily
Priority: high Keywords: 3.8regression, patch

Created on 2019-08-30 21:22 by chivay, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 15626 merged methane, 2019-08-30 23:40
PR 15627 merged methane, 2019-08-31 00:25
Messages (5)
msg350890 - (view) Author: Hubert Jasudowicz (chivay) Date: 2019-08-30 21:22
Example:

Python 3.9.0a0 (heads/master:39d87b5471, Aug 30 2019, 23:19:13) 
[GCC 9.1.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import gc
>>> gc.set_debug(gc.DEBUG_STATS)
>>> gc.collect()
gc: collecting generation 2...
gc: objects in each generation: 589 4120 0
gc: objects in permanent generation: 0
gc: done, 0 unreachable, 0 uncollectable, %.4fs elapsed
0
msg350892 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2019-08-30 21:42
Thanks for the report.  It looks like this regression was introduced by the changes for Issue37729.
msg350900 - (view) Author: Inada Naoki (methane) * (Python committer) Date: 2019-08-31 00:13
New changeset 013e52fd340d9ef558013b546f25456f94ee1804 by Inada Naoki in branch 'master':
bpo-37990: fix gc stats (GH-15626)
https://github.com/python/cpython/commit/013e52fd340d9ef558013b546f25456f94ee1804
msg350905 - (view) Author: Inada Naoki (methane) * (Python committer) Date: 2019-08-31 01:50
New changeset 97a31c7b486c45ba9c21cab5fb96337859a60275 by Inada Naoki in branch '3.8':
[3.8] bpo-37990: fix gc stats (GH-15626)
https://github.com/python/cpython/commit/97a31c7b486c45ba9c21cab5fb96337859a60275
msg350906 - (view) Author: Inada Naoki (methane) * (Python committer) Date: 2019-08-31 01:53
Thank you for finding it!

My eyes were too focused on portability issue of "%zd"...
History
Date User Action Args
2022-04-11 14:59:19adminsetgithub: 82171
2019-08-31 01:53:18methanesetstatus: open -> closed
resolution: fixed
messages: + msg350906

stage: patch review -> resolved
2019-08-31 01:50:32methanesetmessages: + msg350905
2019-08-31 00:25:17methanesetpull_requests: + pull_request15295
2019-08-31 00:13:45methanesetmessages: + msg350900
2019-08-30 23:40:29methanesetkeywords: + patch
stage: needs patch -> patch review
pull_requests: + pull_request15294
2019-08-30 21:42:59ned.deilysetpriority: normal -> high

assignee: methane
versions: + Python 3.8
keywords: + 3.8regression
nosy: + ned.deily, methane

messages: + msg350892
stage: needs patch
2019-08-30 21:25:14chivaysettype: behavior
2019-08-30 21:22:40chivaycreate