Uh oh!
There was an error while loading. Please reload this page.
gh-139940: Handle RuntimeError when attaching to a non-existing process in pdb.py - #139941
Conversation
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
gaogaotiantian
commented
Oct 11, 2025
I think attaching to a non-exist process is a common case where we should produce better error messages. I have a feeling that the message should be even more explicit about "you have the wrong process id". @pablogsal and @godlygeek what do you think? |
godlygeek
commented
Oct 11, 2025
Sounds reasonable to me. Maybe we want to catch the RuntimeError on POSIX and handle it by attempting |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Signed-off-by: Frost Ming <me@frostming.com>
Signed-off-by: Frost Ming <me@frostming.com>
e4cf4cc to
c50b200Compare…cess Signed-off-by: Frost Ming <me@frostming.com>
3bcc075 to
3170eceComparegaogaotiantian
commented
Oct 24, 2025
I think we can make a very simple test to test this addition - could you do it @frostming ? |
Signed-off-by: Frost Ming <me@frostming.com>
frostming
commented
Oct 24, 2025
Done, but there is still a difference between MacOS and other platforms. See the test case. |
Uh oh!
There was an error while loading. Please reload this page.
c1874b4 to
abf589cCompare…mote pdb tests Signed-off-by: Frost Ming <me@frostming.com>
abf589c to
9f51d1cCompareUh oh!
There was an error while loading. Please reload this page.
gaogaotiantian
commented
Oct 29, 2025
Thank you for the contribution! |
Before change:
After change:
Closegh-139940