diff options
author | Victor Stinner <vstinner@python.org> | 2024-11-25 14:24:33 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-25 14:24:33 (GMT) |
commit | d9331f1b16033796a3958f6e0b12626ed7d3e199 (patch) | |
tree | 74f50634bb7a4334a34abe23af85de786f9d3fc7 | |
parent | c7f1e3e150ca181f4b4bd1e5b59d492749f00be6 (diff) | |
download | cpython-d9331f1b16033796a3958f6e0b12626ed7d3e199.zip cpython-d9331f1b16033796a3958f6e0b12626ed7d3e199.tar.gz cpython-d9331f1b16033796a3958f6e0b12626ed7d3e199.tar.bz2 |
gh-107954: Document PEP 741 in What's New 3.14 (#127056)
-rw-r--r-- | Doc/c-api/init_config.rst | 4 | ||||
-rw-r--r-- | Doc/whatsnew/3.14.rst | 36 |
2 files changed, 40 insertions, 0 deletions
diff --git a/Doc/c-api/init_config.rst b/Doc/c-api/init_config.rst index 6194d74..e621545 100644 --- a/Doc/c-api/init_config.rst +++ b/Doc/c-api/init_config.rst @@ -6,6 +6,8 @@ Python Initialization Configuration *********************************** +.. _pyconfig_api: + PyConfig C API ============== @@ -1592,6 +1594,8 @@ The ``__PYVENV_LAUNCHER__`` environment variable is used to set :c:member:`PyConfig.base_executable`. +.. _pyinitconfig_api: + PyInitConfig C API ================== diff --git a/Doc/whatsnew/3.14.rst b/Doc/whatsnew/3.14.rst index 2c1acb8..0e4b9eb 100644 --- a/Doc/whatsnew/3.14.rst +++ b/Doc/whatsnew/3.14.rst @@ -65,6 +65,8 @@ Summary -- release highlights .. PEP-sized items next. +* :ref:`PEP 649: deferred evaluation of annotations <whatsnew314-pep649>` +* :ref:`PEP 741: Python Configuration C API <whatsnew314-pep741>` New features @@ -172,6 +174,40 @@ Improved error messages ValueError: too many values to unpack (expected 3, got 4) +.. _whatsnew314-pep741: + +PEP 741: Python Configuration C API +----------------------------------- + +Add a :ref:`PyInitConfig C API <pyinitconfig_api>` to configure the Python +initialization without relying on C structures and the ability to make +ABI-compatible changes in the future. + +Complete the :pep:`587` :ref:`PyConfig C API <pyconfig_api>` by adding +:c:func:`PyInitConfig_AddModule` which can be used to add a built-in extension +module; feature previously referred to as the “inittab”. + +Add :c:func:`PyConfig_Get` and :c:func:`PyConfig_Set` functions to get and set +the current runtime configuration. + +PEP 587 “Python Initialization Configuration” unified all the ways to configure +the Python initialization. This PEP unifies also the configuration of the +Python preinitialization and the Python initialization in a single API. +Moreover, this PEP only provides a single choice to embed Python, instead of +having two “Python” and “Isolated” choices (PEP 587), to simplify the API +further. + +The lower level PEP 587 PyConfig API remains available for use cases with an +intentionally higher level of coupling to CPython implementation details (such +as emulating the full functionality of CPython’s CLI, including its +configuration mechanisms). + +(Contributed by Victor Stinner in :gh:`107954`.) + +.. seealso:: + :pep:`741`. + + Other language changes ====================== |