Skip to content

bpo-33065: Fix problem debugging user classes with __repr__ method #24183

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 10, 2021

Conversation

terryjreedy
Copy link
Member

@terryjreedy terryjreedy commented Jan 10, 2021

If repr uses instance attributes, as normal, and one steps
through the init method, debugger may try to get repr before
the instance attributes exist. reprlib.repr handles the error.

https://bugs.python.org/issue33065

If __repr__ uses instance attributes, as normal, and one steps
through the __init__ method, debugger may try to get repr before
the instance attributes exist.  reprlib.repr handles the error.
@terryjreedy terryjreedy added type-bug An unexpected behavior, bug, or error needs backport to 3.8 needs backport to 3.9 only security fixes labels Jan 10, 2021
@terryjreedy terryjreedy self-assigned this Jan 10, 2021
@terryjreedy terryjreedy merged commit 81f87bb into python:master Jan 10, 2021
@miss-islington
Copy link
Contributor

Thanks @terryjreedy for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8, 3.9.
🐍🍒⛏🤖

@terryjreedy terryjreedy deleted the debugrep branch January 10, 2021 06:59
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 10, 2021
…ythonGH-24183)

If __repr__ uses instance attributes, as normal, and one steps
through the __init__ method, debugger may try to get repr before
the instance attributes exist.  reprlib.repr handles the error.
(cherry picked from commit 81f87bb)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
@bedevere-bot
Copy link

GH-24184 is a backport of this pull request to the 3.9 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.9 only security fixes label Jan 10, 2021
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 10, 2021
…ythonGH-24183)

If __repr__ uses instance attributes, as normal, and one steps
through the __init__ method, debugger may try to get repr before
the instance attributes exist.  reprlib.repr handles the error.
(cherry picked from commit 81f87bb)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
@bedevere-bot
Copy link

GH-24185 is a backport of this pull request to the 3.8 branch.

miss-islington added a commit that referenced this pull request Jan 10, 2021
…H-24183)

If __repr__ uses instance attributes, as normal, and one steps
through the __init__ method, debugger may try to get repr before
the instance attributes exist.  reprlib.repr handles the error.
(cherry picked from commit 81f87bb)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
miss-islington added a commit that referenced this pull request Jan 10, 2021
…H-24183)

If __repr__ uses instance attributes, as normal, and one steps
through the __init__ method, debugger may try to get repr before
the instance attributes exist.  reprlib.repr handles the error.
(cherry picked from commit 81f87bb)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 13, 2021
…ythonGH-24183)

If __repr__ uses instance attributes, as normal, and one steps
through the __init__ method, debugger may try to get repr before
the instance attributes exist.  reprlib.repr handles the error.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants