Skip to content

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

Merged
terryjreedy merged 1 commit into
python:masterfrom
terryjreedy:debugrep
Jan 10, 2021
Merged

bpo-33065: Fix problem debugging user classes with __repr__ method#24183
terryjreedy merged 1 commit into
python:masterfrom
terryjreedy:debugrep

Conversation

@terryjreedy

@terryjreedy terryjreedy commented Jan 10, 2021

Copy link
Copy Markdown
Member

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 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
Copy Markdown
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
Copy Markdown

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
Copy Markdown

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