-
-
Notifications
You must be signed in to change notification settings - Fork 31.4k
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
GH-101673: Fix pdb bug that local variable changes lost after longlist #101674
Conversation
Most changes to Python require a NEWS entry. Please add it using the blurb_it web app or the blurb command-line tool. |
e0ac654
to
3acb643
Compare
Most changes to Python require a NEWS entry. Please add it using the blurb_it web app or the blurb command-line tool. |
Use double ticks for inline code
@iritkatriel I am wondering if you could be an appropriate reviewer for this. Could you please take a look? |
Thanks for adding the test. Before merging this I would need to spend some time to understand why this happened and to convince myself that this is the right solution. If someone else reviews it before I get around to it that's obviously fine. |
@iritkatriel Thank you for your quick response. I have investigated the issue further and discovered that the problematic However, So I believe that we should consider replacing the custom |
Yeah I think that’s the way to go. The original customized pdb version was to avoid module level frame issue and it would be nice to not to keep multiple identical code pieces around. The functionality seems to be the same. I’ll make the changes to use inspect version directly and remove the pdb version. |
As @ortem said, the reason we had a separate |
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.
Makes sense. Thank you!
Misc/NEWS.d/next/Library/2023-02-09-19-40-41.gh-issue-101673.mX-Ppq.rst
Outdated
Show resolved
Hide resolved
Thanks @gaogaotiantian for the PR, and @iritkatriel for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.11. |
Sorry, @gaogaotiantian and @iritkatriel, I could not cleanly backport this to |
…ter longlist (pythonGH-101674) (cherry picked from commit 5d677c5) Co-authored-by: gaogaotiantian <[email protected]>
GH-102632 is a backport of this pull request to the 3.11 branch. |
…ter longlist (python#101674) (cherry picked from commit 5d677c5)
…nglist (GH-101674) (cherry picked from commit 5d677c5) Co-authored-by: gaogaotiantian <[email protected]>
GH-102633 is a backport of this pull request to the 3.10 branch. |
The bug is described in #101673.
Using
f_code.co_name
to check whether it's a frame module avoids readingf_local
whose side effect reverts local variable changes in pdb.