-
-
Notifications
You must be signed in to change notification settings - Fork 31k
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-93911: LOAD_ATTR_PROPERTY
#93912
Merged
Fidget-Spinner
merged 14 commits into
python:main
from
Fidget-Spinner:load_attr_property
Jun 17, 2022
Merged
gh-93911: LOAD_ATTR_PROPERTY
#93912
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
c9966d1
More LOAD_ATTR specializations
Fidget-Spinner e66782b
📜🤖 Added by blurb_it.
blurb-it[bot] c7bde64
fix compiler warnings
Fidget-Spinner 6a03dad
Fix double backticks
Fidget-Spinner c78831d
Apply Mark's suggestions
Fidget-Spinner d03cc61
try to fix compiler warnings
Fidget-Spinner 36af644
re-enable LOAD_ATTR_CLASS_MUTABLE_DESCRIPTOR
Fidget-Spinner c20af47
Remove double stat count
Fidget-Spinner 3d5d5fd
remove LOAD_ATTR_MUTABLE_CLASS_DESCRIPTOR
Fidget-Spinner 7f45ec1
Delete 2022-06-16-08-56-26.gh-issue-93657.AZG2WT.rst
Fidget-Spinner a6c4ab3
📜🤖 Added by blurb_it.
blurb-it[bot] 626bfa1
fix up stats and deopt
Fidget-Spinner 4786bac
Use 32 bit func_version
Fidget-Spinner 9f32d03
remove the version check
Fidget-Spinner 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 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,26 @@ | ||
#ifndef Py_INTERNAL_DESCROBJECT_H | ||
#define Py_INTERNAL_DESCROBJECT_H | ||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
#ifndef Py_BUILD_CORE | ||
# error "this header requires Py_BUILD_CORE define" | ||
#endif | ||
|
||
typedef struct { | ||
PyObject_HEAD | ||
PyObject *prop_get; | ||
PyObject *prop_set; | ||
PyObject *prop_del; | ||
PyObject *prop_doc; | ||
PyObject *prop_name; | ||
int getter_doc; | ||
} propertyobject; | ||
|
||
typedef propertyobject _PyPropertyObject; | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
#endif /* !Py_INTERNAL_DESCROBJECT_H */ |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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 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
1 change: 1 addition & 0 deletions
1
Misc/NEWS.d/next/Core and Builtins/2022-06-16-16-53-22.gh-issue-93911.RDwIiK.rst
This file contains 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 @@ | ||
Specialize ``LOAD_ATTR`` for ``property()`` attributes. |
This file contains 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 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 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 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.
Maybe "pycore_property.h" as it is just the property struct.
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.
I'm leaving it generic from now (and naming it after the file it came from) so that I can re-use it again in the future when I add more specialisations. (E.g. classmethod is also from the same file)
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.
Do properties and classmethods really belong in the same file? Sure, they are both descriptors, but so are Python functions.
The file layout is a bit of an historical artifact.
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.
If you don't want to change it for this PR, that's fine too.