Skip to content

[C API] Move PyFrame_* API to <Python.h> #93937

Description

@vstinner

Currently, getter functions of a Python frame object (PyFrameObject) are only accessible if the frameobject.h header is included explicitly. It's not documented in the frame doc: https://docs.python.org/dev/c-api/frame.html

In Python 3.11, the PyFrameObject structure was moved to the internal C API. Third party C extensions now must only use getter functions, as explained in What's New in Python 3.11: https://docs.python.org/dev/whatsnew/3.11.html#id6

Problem: functions like PyFrame_GetBack() requires to include frameobject.h. I propose to move these getter functions to Python.h (to pyframe.h in practice) to make these functions less special.

Linked PRs

Activity

  1. added 3 commits that reference this issue on Jun 19, 2022
  2. vstinner commented on Jun 20, 2022

    @vstinner
    MemberAuthor

    Done:

  3. kumaraditya303 commented on Sep 17, 2022

    @kumaraditya303
    Contributor

    This is fixed, closing.

  4. changed the title [-][C API] Move PyFrame_GetBack() function to <Python.h>[/-] [+][C API] Move PyFrame_* API to <Python.h>[/+] on Nov 22, 2022
  5. encukou commented on Nov 22, 2022

    @encukou
    Member

    I'll reuse this issue to add missing docs.

  6. added 2 commits that reference this issue on Nov 22, 2022
  7. added 2 commits that reference this issue on Nov 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions