-
-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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-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. |
@@ -0,0 +1 @@ | |||
Fix pdb can't output prompt message when breakpoints are successfully cleared by (filename, lineno). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are two news files - this one can be deleted.
Misc/NEWS.d/next/Library/2021-02-25-08-32-06.bpo-43318.bZJw6V.rst
Outdated
Show resolved
Hide resolved
Please also resolve the merge conflict on test_pdb.py (rebase your branch). |
…r breakpoints by filename:lineno
Co-authored-by: Irit Katriel <[email protected]>
Co-authored-by: Irit Katriel <[email protected]>
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 <[email protected]>
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 <[email protected]>
GH-26675 is a backport of this pull request to the 3.9 branch. |
…ts (GH-24646) (GH-26674) (cherry picked from commit 4cb6ba1) Co-authored-by: huzhaojie <[email protected]>
…ts (GH-24646) (GH-26675) (cherry picked from commit 4cb6ba1) Co-authored-by: huzhaojie <[email protected]>
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