Visitar URL original
bpo-37022: Fix bug where `pdb`'s `do_p`/`do_pp` commands swallow exceptions from `repr` by blueyed · Pull Request #18180 · python/cpython · GitHub
The Wayback Machine - https://web.archive.org/web/20220202185145/https://github.com/python/cpython/pull/18180
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-37022: Fix bug where pdb's do_p/do_pp commands swallow exceptions from repr #18180

Merged
merged 4 commits into from Jun 10, 2021

Conversation

@blueyed
Copy link
Contributor

@blueyed blueyed commented Jan 25, 2020 •

Fixes https://bugs.python.org/issue37022.

https://bugs.python.org/issue37022

Lib/pdb.py Outdated
try:
val = self._getval(arg)
except:
return
Copy link
Member

@iritkatriel iritkatriel Aug 21, 2020

Choose a reason for hiding this comment

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

Might be worth a comment that getval already emitted an error

@gvanrossum
Copy link
Member

@gvanrossum gvanrossum commented Dec 22, 2020

This looks to me like a bugfix and seems safe to backport to 3.9 and 3.8. Clearly the intention was to just catch the exception from _getval() and that it caught something else would be an unfortunate side effect, not something someone would rely on.

Lib/pdb.py Outdated Show resolved Hide resolved
@bedevere-bot
Copy link

@bedevere-bot bedevere-bot commented Jun 10, 2021

🤖 New build scheduled with the buildbot fleet by @iritkatriel for commit 084d10b 🤖

If you want to schedule another build, you need to add the "🔨 test-with-buildbots" label again.

@iritkatriel iritkatriel changed the title bpo-37022: pdb: do not swallow exceptions from repr with do_p/do_pp bpo-37022: Fix bug where pdb's do_p/do_pp commands swallow exceptions from repr Jun 10, 2021
@gvanrossum
Copy link
Member

@gvanrossum gvanrossum commented Jun 10, 2021

Irit, you can manage this by yourself, right?

@iritkatriel
Copy link
Member

@iritkatriel iritkatriel commented Jun 10, 2021

Irit, you can manage this by yourself, right?

Yes. Just waiting for the bot to finish.

@iritkatriel iritkatriel merged commit 6544b25 into python:main Jun 10, 2021
73 checks passed
@miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Jun 10, 2021

Thanks @blueyed for the PR, and @iritkatriel for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.9.
🐍🍒⛏🤖

@bedevere-bot
Copy link

@bedevere-bot bedevere-bot commented Jun 10, 2021

GH-26650 is a backport of this pull request to the 3.10 branch.

miss-islington added a commit to miss-islington/cpython that referenced this issue Jun 10, 2021
… from repr (pythonGH-18180)

(cherry picked from commit 6544b25)

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

@bedevere-bot bedevere-bot commented Jun 10, 2021

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

miss-islington added a commit to miss-islington/cpython that referenced this issue Jun 10, 2021
… from repr (pythonGH-18180)

(cherry picked from commit 6544b25)

Co-authored-by: Daniel Hahler <git@thequod.de>
iritkatriel pushed a commit that referenced this issue Jun 10, 2021
… from repr (GH-18180) (GH-26650)

(cherry picked from commit 6544b25)

Co-authored-by: Daniel Hahler <git@thequod.de>
iritkatriel pushed a commit that referenced this issue Jun 10, 2021
… from repr (GH-18180) (GH-26651)

(cherry picked from commit 6544b25)

Co-authored-by: Daniel Hahler <git@thequod.de>
JuniorJPDJ added a commit to JuniorJPDJ/cpython that referenced this issue Aug 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants