Skip to content

Conversation

@blueyed
Copy link
Contributor

@blueyed blueyed commented Dec 16, 2020

Regression in 8d59eb1
(v3.8.0b1-1208-g8d59eb1b66).

https://bugs.python.org/issue37961

Regression in 8d59eb1
(v3.8.0b1-1208-g8d59eb1b66).
@blueyed
Copy link
Contributor Author

blueyed commented Dec 16, 2020

/cc @jd


def __repr__(self):
s = "<Traceback %r" % tuple(self)
s = f"<Traceback {tuple(self)}"
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch

@vstinner
Copy link
Member

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.

@blueyed
Copy link
Contributor Author

blueyed commented Dec 16, 2020

@vstinner

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.

@miss-islington
Copy link
Contributor

Thanks @blueyed for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.9.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 16, 2020
…-23805)

Regression in 8d59eb1.
(cherry picked from commit 051b981)

Co-authored-by: Daniel Hahler <git@thequod.de>
@bedevere-bot
Copy link

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

@vstinner
Copy link
Member

The 3.8 branch is not affected:

        return "<Traceback %r>" % (tuple(self),)

@vstinner
Copy link
Member

Well spotted, thanks for the fix, especially for additional tests! I merged your PR and backported it to 3.9.

@blueyed blueyed deleted the fix-tracemalloc-traceback-repr branch December 16, 2020 21:51
miss-islington added a commit that referenced this pull request Dec 16, 2020
Regression in 8d59eb1.
(cherry picked from commit 051b981)

Co-authored-by: Daniel Hahler <git@thequod.de>
adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants