Skip to content

Add PEP 741 PyInitConfig API to the limited C API #149163

@vstinner

Description

@vstinner

The GDB project would be interested to use the limited C API to embed Python. Some APIs used by GDB are missing from the limited C API (well, it's limited ;-)), one of them is the PEP 741 PyInitConfig API.

I propose adding PEP 741 PyInitConfig API to the limited C API.

PEP 741 Rationale lists other projects embedding Python. More projects would benefit from PyInitConfig being in the limited C API.

For example, the vim text editor uses dlopen/dlsym and GetProcAddress on Windows to get Python symbols at runtime. The libpython library is loaded on demand (at the first Python usage). vim already supports the stable ABI. See src/if_python3.c.

So far, I found pyinstaller which already adopted the PyInitConfig API.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions