-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
bpo-37961: fix regression in tracemalloc.Traceback.__repr__ #23805
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-37961: fix regression in tracemalloc.Traceback.__repr__ #23805
Conversation
Regression in 8d59eb1 (v3.8.0b1-1208-g8d59eb1b66).
/cc @jd |
@@ -226,7 +226,7 @@ def __str__(self): | |||
return str(self[0]) | |||
|
|||
def __repr__(self): | |||
s = "<Traceback %r" % tuple(self) | |||
s = f"<Traceback {tuple(self)}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm confused about what this changes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"%r" % (1,2,3)
raises: "TypeError: not all arguments converted during string formatting".
This was changed (apparently unintentionally) in 8d59eb1#diff-cbaacb7ac396956c9595b4899ef2ab31b02b264099e02eba56fbe2f5f2e441c0L224-R229.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice catch
Can you please explain what is the bug? https://bugs.python.org/issue37961 is closed, I suggest to open a new issue to explain your bug. |
I wanted to avoid noise in the issue tracker, but can do so later if you still think it is not a fixup/follow-up to the closed issue. |
…-23805) Regression in 8d59eb1. (cherry picked from commit 051b981) Co-authored-by: Daniel Hahler <[email protected]>
GH-23809 is a backport of this pull request to the 3.9 branch. |
The 3.8 branch is not affected:
|
Well spotted, thanks for the fix, especially for additional tests! I merged your PR and backported it to 3.9. |
Regression in 8d59eb1. (cherry picked from commit 051b981) Co-authored-by: Daniel Hahler <[email protected]>
Regression in 8d59eb1
(v3.8.0b1-1208-g8d59eb1b66).
https://bugs.python.org/issue37961