bpo-37022: Fix bug where `pdb`'s `do_p`/`do_pp` commands swallow exceptions from `repr` by blueyed ยท Pull Request #18180 ยท python/cpython
| try: | ||
| val = self._getval(arg) | ||
| except: | ||
| return |
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
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.
๐ค New build scheduled with the buildbot fleet by @iritkatriel for commit 084d10b ๐ค
If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again.
iritkatriel
changed the title
bpo-37022: pdb: do not swallow exceptions from
bpo-37022: Fix bug where repr with do_p/do_pppdb's do_p/do_pp commands swallow exceptions from repr
Thanks @blueyed for the PR, and @iritkatriel for merging it ๐ฎ๐.. I'm working now to backport this PR to: 3.10, 3.9.
๐๐โ๐ค
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request
Jun 10, 2021โฆ from repr (pythonGH-18180) (cherry picked from commit 6544b25) Co-authored-by: Daniel Hahler <git@thequod.de>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request
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 pull request
Jun 10, 2021iritkatriel pushed a commit that referenced this pull request
Jun 10, 2021This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters