bpo-43318: Fix a bug where pdb does not always echo cleared breakpoints.#24646
Conversation
|
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed the PSF contributor agreement (CLA). CLA MissingOur records indicate the following people have not signed the CLA: For legal reasons we need all the people listed to sign the CLA before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. If you have recently signed the CLA, please wait at least one business day You can check yourself to see if the CLA has been received. Thanks again for the contribution, we look forward to reviewing it! |
|
This PR is stale because it has been open for 30 days with no activity. |
There was a problem hiding this comment.
There are two news files - this one can be deleted.
|
Please also resolve the merge conflict on test_pdb.py (rebase your branch). |
…r breakpoints by filename:lineno
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
I have rebased my branch, please review again. |
|
🤖 New build scheduled with the buildbot fleet by @iritkatriel for commit 0577eae 🤖 If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again. |
|
Thank you @hjzin . This looks good now. I will merge once the tests have run. |
|
🤖 New build scheduled with the buildbot fleet by @iritkatriel for commit df58705 🤖 If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again. |
|
Thanks @hjzin for the PR, and @iritkatriel for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.9. |
…ts (pythonGH-24646) (cherry picked from commit 4cb6ba1) Co-authored-by: huzhaojie <hu.zj@foxmail.com>
|
GH-26674 is a backport of this pull request to the 3.10 branch. |
…ts (pythonGH-24646) (cherry picked from commit 4cb6ba1) Co-authored-by: huzhaojie <hu.zj@foxmail.com>
|
GH-26675 is a backport of this pull request to the 3.9 branch. |
https://bugs.python.org/issue43318
In Pdb, when successfully clear breakpoints, the Pdb should output a message:"Deleted XXX", but when breakpoints are cleared by filename:lineno, the message can't be output.
I think it's related to the following code.
self.get_breaks is called to get the breakpoints to be deleted, the result is in bplist. self.clear_break is called to delete the breakpoints in bplist. Each element in bplist is a reference to a Breakpoint object, so when all Breakpoint objects are removed, the bplist will become an empty list when self.clear_break is called, so pdb can't output the prompt message.
It can be simply fixed by following code:
https://bugs.python.org/issue43318