GH-101673: Fix pdb bug that local variable changes lost after longlist#101674
GH-101673: Fix pdb bug that local variable changes lost after longlist#101674iritkatriel merged 7 commits into
Conversation
|
Most changes to Python require a NEWS entry. Please add it using the blurb_it web app or the blurb command-line tool. |
Sorry, something went wrong.
Sorry, something went wrong.
e0ac654 to
3acb643
Compare
February 9, 2023 19:35
|
Most changes to Python require a NEWS entry. Please add it using the blurb_it web app or the blurb command-line tool. |
Sorry, something went wrong.
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? |
Sorry, something went wrong.
|
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. |
Sorry, something went wrong.
|
@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 |
Sorry, something went wrong.
|
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. |
Sorry, something went wrong.
|
As @ortem said, the reason we had a separate |
Sorry, something went wrong.
iritkatriel
left a comment
There was a problem hiding this comment.
Makes sense. Thank you!
Sorry, something went wrong.
|
Thanks @gaogaotiantian for the PR, and @iritkatriel for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.11. |
Sorry, something went wrong.
|
Sorry, @gaogaotiantian and @iritkatriel, I could not cleanly backport this to |
Sorry, something went wrong.
…ter longlist (pythonGH-101674) (cherry picked from commit 5d677c5) Co-authored-by: gaogaotiantian <gaogaotiantian@hotmail.com>
…ter longlist (python#101674) (cherry picked from commit 5d677c5)
The bug is described in #101673.
Using
f_code.co_nameto check whether it's a frame module avoids readingf_localwhose side effect reverts local variable changes in pdb.