Skip to content
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

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

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 self-assigned this Jan 10, 2021
@terryjreedy terryjreedy merged commit 81f87bb into python:master Jan 10, 2021
3 checks passed
@miss-islington
Copy link
Contributor

miss-islington commented Jan 10, 2021

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

@terryjreedy terryjreedy deleted the debugrep branch 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

bedevere-bot commented Jan 10, 2021

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

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

bedevere-bot commented Jan 10, 2021

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.

None yet

4 participants