Visitar URL original
gc.DEBUG_STATS no longer print out anything · Issue #122298 · python/cpython · GitHub
Skip to content

gc.DEBUG_STATS no longer print out anything #122298

Description

@user202729

Bug report

Bug description:

The command gc.set_debug(gc.DEBUG_STATS) no longer prints out any statistics, even though gc.set_debug(gc.DEBUG_COLLECTABLE) shows that the gc is still being run.

(Probably caused by the incremental GC implementation, #116206 .)

For testing you can use the following code --- in previous Python versions the collecting generation 0 text is printed, now it's not

import gc
import sys
from time import sleep
gc.set_debug(gc.DEBUG_STATS | gc.DEBUG_COLLECTABLE)

for __ in range(3000):
	a=[1]
	a[0]=a
	del a
	print(__)
	sleep(0.001)

sys.exit()

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux

Linked PRs

Activity

  1. encukou commented on Jul 26, 2024

    @encukou
    Member

    @markshannon Was this intentional?

  2. self-assigned this
    on Aug 23, 2024
  3. added a commit that references this issue on Aug 23, 2024
  4. added a commit that references this issue on Aug 23, 2024
  5. added a commit that references this issue on Sep 2, 2024
  6. added a commit that references this issue on Sep 29, 2024
  7. hugovk commented on Jan 7, 2025

    @hugovk
    Member

    Thanks for the fix and backport, let's close if nothing left to do here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

interpreter-core(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or error

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions