Cleanup unnecessary curframe_locals usage#124369
Merged
gaogaotiantian merged 1 commit intopython:mainfrom Sep 26, 2024
Merged
Conversation
ncoghlan
approved these changes
Sep 26, 2024
Contributor
ncoghlan
left a comment
There was a problem hiding this comment.
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 document any public attributes on pdb instances (only methods) makes me more comfortable with it here.
Member
Author
|
Thanks! In general attributes of |
gabifalk
added a commit
to gabifalk/gentoo
that referenced
this pull request
Dec 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 in PR cpython#125951 before the CPython 3.14 release. Url: ipython/ipython#14598 Url: ipython/ipython@c1e945b Url: python/cpython#124369 Url: python/cpython#125951 Url: ipython/ipython#14620 Closes: https://bugs.gentoo.org/946568 Signed-off-by: Gabi Falk <gabifalk@gmx.com>
gabifalk
added a commit
to gabifalk/gentoo
that referenced
this pull request
Dec 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 in PR cpython#125951 before the CPython 3.14 release. Url: ipython/ipython#14598 Url: ipython/ipython@c1e945b Url: python/cpython#124369 Url: python/cpython#125951 Url: ipython/ipython#14620 Closes: https://bugs.gentoo.org/946568 Signed-off-by: Gabi Falk <gabifalk@gmx.com>
gentoo-bot
pushed a commit
to gentoo/gentoo
that referenced
this pull request
Dec 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 in PR cpython#125951 before the CPython 3.14 release. Url: ipython/ipython#14598 Url: ipython/ipython@c1e945b Url: python/cpython#124369 Url: python/cpython#125951 Url: ipython/ipython#14620 Closes: https://bugs.gentoo.org/946568 Signed-off-by: Gabi Falk <gabifalk@gmx.com> Closes: #39746 Signed-off-by: Sam James <sam@gentoo.org>
bretello
added a commit
to bretello/pdbpp
that referenced
this pull request
Apr 18, 2025
bretello
added a commit
to bretello/pdbpp
that referenced
this pull request
Apr 18, 2025
bretello
added a commit
to bretello/pdbpp
that referenced
this pull request
Nov 17, 2025
bretello
added a commit
to bretello/pdbpp
that referenced
this pull request
Nov 17, 2025
bretello
added a commit
to bretello/pdbpp
that referenced
this pull request
Nov 23, 2025
bretello
added a commit
to bretello/pdbpp
that referenced
this pull request
Nov 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 free
to 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 :)