pprint: infinite recursion for saferepr() when using nested objects, but str() works
Open
Nobody has claimed this yet.
3.10
3.11
3.9 (EOL)
stdlib
type-bug
- Dominant language
- Python
- Stars
- 77.2k
- Forks
- 36k
- PR merge metrics
- PR metrics pending
Description
| BPO | 42259 |
|---|---|
| Nosy | @serhiy-storchaka, @iritkatriel, @danbst, @akulakov |
| PRs |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee = None
closed_at = None
created_at = <Date 2020-11-04.11:44:31.577>
labels = ['type-bug', 'library', '3.9', '3.10', '3.11']
title = 'pprint: infinite recursion for saferepr() when using nested objects, but str() works'
updated_at = <Date 2022-01-03.23:47:48.417>
user = 'https://github.com/danbst'
bugs.python.org fields:
activity = <Date 2022-01-03.23:47:48.417>
actor = 'iritkatriel'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = ['Library (Lib)']
creation = <Date 2020-11-04.11:44:31.577>
creator = 'danbst'
dependencies = []
files = []
hgrepos = []
issue_num = 42259
keywords = ['patch']
message_count = 4.0
messages = ['380315', '380384', '409176', '409641']
nosy_count = 4.0
nosy_names = ['serhiy.storchaka', 'iritkatriel', 'danbst', 'andrei.avk']
pr_nums = ['30256']
priority = 'normal'
resolution = None
stage = 'patch review'
status = 'open'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue42259'
versions = ['Python 3.9', 'Python 3.10', 'Python 3.11']
Linked PRs
- gh-119829
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue identifies pprint.saferepr() and links PR gh-119829, but names no source file or test. Review that pull request and the pprint implementation first; done should mean nested objects no longer cause infinite recursion while str() continues to work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100