Skip to content

-X showrefcount doesn't do per-statement reports in new REPL #134097

Closed
@encukou

Description

@encukou

Bug report

Bug description:

-X showrefcount should “output the total reference count and number of used memory blocks [...] after each statement in the interactive interpreter. This only works on debug builds.”

This works with PYTHON_BASIC_REPL=1, but with the new REPL the totals are only shown at exit.

CPython versions tested on:

3.13, 3.14, CPython main branch

Operating systems tested on:

Linux

Linked PRs

Activity

added
type-bugAn unexpected behavior, bug, or error
topic-replRelated to the interactive shell
on May 16, 2025
Eclips4

Eclips4 commented on May 16, 2025

@Eclips4
Member

Hi Petr, are you working on this? Happy to take it if you're busy! :)

added
3.13bugs and security fixes
3.14bugs and security fixes
3.15new features, bugs and security fixes
stdlibPython modules in the Lib dir
and removed
stdlibPython modules in the Lib dir
on May 16, 2025
encukou

encukou commented on May 16, 2025

@encukou
MemberAuthor
self-assigned this
on May 16, 2025
added a commit that references this issue on May 19, 2025

gh-134097: Print number of refs & blocks after each statement in new …

c31547a
added a commit that references this issue on May 19, 2025

pythongh-134097: Print number of refs & blocks after each statement i…

5 remaining items

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

Metadata

Metadata

Assignees

Labels

3.13bugs and security fixes3.14bugs and security fixes3.15new features, bugs and security fixesstdlibPython modules in the Lib dirtopic-replRelated to the interactive shelltype-bugAn unexpected behavior, bug, or error

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    `-X showrefcount` doesn't do per-statement reports in new REPL · Issue #134097 · python/cpython

    Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

    Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant