Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork34.1k
Cleanup unnecessary curframe_locals usage#124369
Merged
gaogaotiantian merged 1 commit intopython:mainfromSep 26, 2024
Merged
Conversation
ncoghlan approved these changesSep 26, 2024
Contributor
ncoghlan left a comment
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.
The code simplification LGTM.
While I'm normally paranoid about treating any attribute without a leading underscore as implicitly public (regardless of documentation status), the fact we don't documentany public attributes onpdb instances (only methods) makes me more comfortable with it here.
MemberAuthor
gaogaotiantian commentedSep 26, 2024
Thanks! In general attributes of |
gabifalk added a commit to gabifalk/gentoo that referenced this pull requestDec 17, 2024
The regression was detected by ipython's own testsuite.This part of the IPython code is expected to break again with python 3.14,because the curframe_locals attribute was removed in the PR cpython#124369.However, there are plans to restore this attribute for backward compatibility inPR cpython#125951 before the CPython 3.14 release.Url:ipython/ipython#14598Url:ipython/ipython@c1e945bUrl:python/cpython#124369Url:python/cpython#125951Url:ipython/ipython#14620Closes:https://bugs.gentoo.org/946568Signed-off-by: Gabi Falk <gabifalk@gmx.com>
gabifalk added a commit to gabifalk/gentoo that referenced this pull requestDec 17, 2024
The regression was detected by ipython's own testsuite.This part of the IPython code is expected to break again with python 3.14,because the curframe_locals attribute was removed in the PR cpython#124369.However, there are plans to restore this attribute for backward compatibility inPR cpython#125951 before the CPython 3.14 release.Url:ipython/ipython#14598Url:ipython/ipython@c1e945bUrl:python/cpython#124369Url:python/cpython#125951Url:ipython/ipython#14620Closes:https://bugs.gentoo.org/946568Signed-off-by: Gabi Falk <gabifalk@gmx.com>
gentoo-bot pushed a commit to gentoo/gentoo that referenced this pull requestDec 20, 2024
The regression was detected by ipython's own testsuite.This part of the IPython code is expected to break again with python 3.14,because the curframe_locals attribute was removed in the PR cpython#124369.However, there are plans to restore this attribute for backward compatibility inPR cpython#125951 before the CPython 3.14 release.Url:ipython/ipython#14598Url:ipython/ipython@c1e945bUrl:python/cpython#124369Url:python/cpython#125951Url:ipython/ipython#14620Closes:https://bugs.gentoo.org/946568Signed-off-by: Gabi Falk <gabifalk@gmx.com>Closes:#39746Signed-off-by: Sam James <sam@gentoo.org>
bretello added a commit to bretello/pdbpp that referenced this pull requestApr 18, 2025
bretello added a commit to bretello/pdbpp that referenced this pull requestApr 18, 2025
bretello added a commit to bretello/pdbpp that referenced this pull requestNov 17, 2025
bretello added a commit to bretello/pdbpp that referenced this pull requestNov 17, 2025
bretello added a commit to bretello/pdbpp that referenced this pull requestNov 23, 2025
bretello added a commit to bretello/pdbpp that referenced this pull requestNov 24, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is just a cleanup for the workaround solution for frame locals. Before PEP 667, accessing
frame.f_localswill clear the changes pdb made toframe.f_localsso we had to copy it to a new dict and work on that. However, it still has its caveats like#102864.Now
f_localshas a clear meaning and behavior, we should try to use it as much as possible. This change has no user observable behavior change. Theoretically it's a little bit different than before because each call toframe.f_localscreates a new proxy, but in practice we should see no difference.@ncoghlan could you take a look at the PR? You are familiar with the concept of PEP 667 so I think your review would be helpful. Also it's the sprint and I don't want to throw everything on Irit :)