Repository navigation
RFC: Clarify usage of macros for PySequence_Fast within the Limited C API #91417
Description
Activity
The
current documentation_ of the Python-C API mentions thatPySequence_Fastis part of the limited API. However, this may be a typo as all the functions interacting with aPySequence_Fastobject are macros, e.g.PySequence_Fast_GET_SIZE,PySequence_Fast_GET_ITEMetc.If this is indeed a documentation bug I'm happy to open a PR to fix this once consensus is reached.
.. _
current documentation: https://docs.python.org/3/c-api/stable.html#contents-of-limited-api- addeddocsDocumentation in the Doc dirDocumentation in the Doc dir
on Apr 8, 2022 - addeddocsDocumentation in the Doc dirDocumentation in the Doc dir
on Apr 8, 2022 Perhaps to be clear, there are two possibilities:
PySequence_Fastshould be removed from the Limited API- All macros used with
PySequence_Fastare valid for use in the context of the Limited API
In either case the documentation should need to be clarified.
The only situation where no changes would result is if:
PySequence_Fastis part of the Limited API, but must be treated the same as a regularPySequenceobject- Since only
PySequence_Sizeand other variants can be used in the context of the Limited API
- Since only
This is actually also still confusing and should be mentioned clearly.
- changed the title
[-]RFC: Clarify Limited API macros for PySequence_Fast[/-][+]RFC: Clarify usage of macros for PySequence_Fast within the Limited C API[/+]on Apr 8, 2022 - changed the title
[-]RFC: Clarify Limited API macros for PySequence_Fast[/-][+]RFC: Clarify usage of macros for PySequence_Fast within the Limited C API[/+]on Apr 8, 2022 I created PR gh-129398 to remove the function
PySequence_Fast()from the limited C API.The function was removed from the limited C API by change 2ad069d.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
Linked PRs