Docs: fill in descriptor C API docs#146644
Conversation
ZeroIntensity
left a comment
There was a problem hiding this comment.
Thanks for tackling these.
|
|
||
|
|
||
| .. c:function:: PyObject* PyDescr_NewWrapper(PyTypeObject *type, struct wrapperbase *wrapper, void *wrapped) | ||
| .. c:function:: PyObject* PyDescr_NewWrapper(PyTypeObject *type, struct wrapperbase *base, void *wrapped) |
There was a problem hiding this comment.
wrapperbase is undocumented as well -- can we fix that in this PR?
There was a problem hiding this comment.
Sure, I'll be working on it
| Create a new get-set descriptor for extension type *type* from the | ||
| :c:type:`PyGetSetDef` structure *getset*. |
There was a problem hiding this comment.
Let's elaborate a little more (the same goes for the ones below):
- What is a get-set descriptor, exactly?
- Why do users care? (Or, what might they use this for?)
- What does this correspond to in Python?
|
Implemented, thanks! I expanded the new descriptor docs to explain:
I also documented |
|
Added a follow-up to remove |
|
Thanks @Boyeep for the PR, and @ZeroIntensity for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14. |
|
Sorry, @Boyeep and @ZeroIntensity, I could not cleanly backport this to |
|
Sorry, @Boyeep and @ZeroIntensity, I could not cleanly backport this to |
|
@Boyeep Would you like to try the backport? |
|
I checked the conflicts for both 3.14 and 3.13. They’re in
|
This documents several missing entries in
Doc/c-api/descriptor.rst.Changes in this PR:
PyDescr_NewGetSetPyDescr_NewMemberPyDescr_NewMethodPyDescr_NewWrapperPyDescr_NewClassMethodPyWrapper_Newtypesmodule namesThis is a docs-only change.
📚 Documentation preview 📚: https://cpython-previews--146644.org.readthedocs.build/