| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
The PyInitConfig API is the modern way for programs embedding Python to initialize the interpreter. However, it was excluded from the limited C API, forcing embedders to use deprecated legacy APIs or build against the full (unstable) C API. Create a new top-level `Include/initconfig.h` header (following the established `pylifecycle.h` / `longobject.h` pattern) that exposes the opaque `PyInitConfig` struct and all 14 associated functions to limited API consumers targeting Python 3.15+. The internal types (PyConfig, PyPreConfig, PyStatus, etc.) remain excluded from the limited API.
Sorry, something went wrong.
|
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead. |
Sorry, something went wrong.
There was a problem hiding this comment.
This is definitely wrong, there is no way this PR fixed all ~1000 issues. I assume something has broken, somewhere.
Sorry, something went wrong.
There was a problem hiding this comment.
Yeah you're right. The docs build was crashing before it could give any warnings. I have reverted the .nitignore changes and fixed the actual cause.
Sorry, something went wrong.
Documentation build overview16 files changed · ± 16 modified ± Modified |
Sorry, something went wrong.
|
All checks are passing now, this should be good to go. cc @StanFromIreland |
Sorry, something went wrong.
|
Ah. I planned to write a PR once we will get an agreement on the adding PEP 741 to the limited C API, especially get an approval of the C API Working Group. IMO this PR was created too soon, and I suggest closing it. |
Sorry, something went wrong.
|
Got it, didn't realize this still needed the C API WG approval. Happy to close this for now. Let me know if this is useful as a reference once things are agreed on, happy to reopen or rework it then. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Closes #149163 --> cc @vstinner
Summary
Add the PEP 741 PyInitConfig API to the limited C API / stable ABI, so programs embedding Python (GDB, Vim, PyInstaller, etc.) can use the modern initialization API without building against the full C API.
Internal types (PyConfig, PyPreConfig, PyStatus, PyWideStringList) remain excluded from the limited API.