-
-
Notifications
You must be signed in to change notification settings - Fork 32k
bpo-44800: unobtrusively rename _PyInterpreterFrame to _Py_frame #32024
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? 8000 Sign in to your account
Closed
ncoghlan
wants to merge
12
commits into
python:main
from
ncoghlan:bpo-44800-py-frame-minimal-changes
Closed
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
70d2322
bpo-44800: Rename _PyInterpreterFrame to _Py_frame
ncoghlan 28402ec
Fix misleading use of 'cframe' name in typeobject.c
ncoghlan 90664e6
f_frame is not public, don't mention in What's New
ncoghlan 9dced1f
Add NEWS entry
ncoghlan f20b1f9
Fix another use of cframe in typeoject.c
ncoghlan a8d3c9e
ReST is not Markdown
ncoghlan 32c224f
Compatibility workaround to match 3.11a6 API
ncoghlan dda99b3
Update comments for scaled back proposal
ncoghlan c725c6b
No aliases to check now
ncoghlan 9526ce0
Adjust NEWS entry
ncoghlan 0acb559
Fix typo in comment
ncoghlan 763a615
Merge remote-tracking branch 'origin/main' into bpo-44800-py-frame-mi…
ncoghlan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
5 changes: 5 additions & 0 deletions
5
Misc/NEWS.d/next/Core and Builtins/2022-03-19-21-47-36.bpo-44800.XnGKoD.rst
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Renamed ``_PyInterpreterFrame`` as ``_Py_frame`` to emphasise its close | ||
association with ``PyFrameObject`` (they're conceptually the same thing, but | ||
split into a Python object struct and a C data struct as a performance | ||
optimisation). ``_PyInterpreterFrame`` is retained as a compatibility alias | ||
to avoid any disruption to the Python 3.11 performance improvement work. |
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
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
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
Oops, something went wrong.
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.
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.
What does "conceptually the same thing" mean?
They aren't the same thing. What is the concept that makes them the same?
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 same thing that makes it OK to pass both
PyFrameObject
and_PyInterpreterFrame
structs to functions that have names starting with_PyFrame
: they're Python code evaluation frames either way, but you may be working with the underlying data storage directly, or you may be working with the full refcounted Python object.The difference between the two is mechanical (how their memory allocation is managed) rather than conceptual.
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.
Your concepts are just that, your concepts. They are highly subjective.
PyFrameObject
s and_PyInterpreterFrame
are different things. One is a reference counted heap object, the other a stack frame. They have to managed quite differently, to me that means they are "conceptually distinct".