Skip to content

Commit d9331f1

Browse files
authored
gh-107954: Document PEP 741 in What's New 3.14 (#127056)
1 parent c7f1e3e commit d9331f1

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

Doc/c-api/init_config.rst

+4
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
Python Initialization Configuration
77
***********************************
88

9+
.. _pyconfig_api:
10+
911
PyConfig C API
1012
==============
1113

@@ -1592,6 +1594,8 @@ The ``__PYVENV_LAUNCHER__`` environment variable is used to set
15921594
:c:member:`PyConfig.base_executable`.
15931595
15941596
1597+
.. _pyinitconfig_api:
1598+
15951599
PyInitConfig C API
15961600
==================
15971601

Doc/whatsnew/3.14.rst

+36
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ Summary -- release highlights
6565
6666
.. PEP-sized items next.
6767
68+
* :ref:`PEP 649: deferred evaluation of annotations <whatsnew314-pep649>`
69+
* :ref:`PEP 741: Python Configuration C API <whatsnew314-pep741>`
6870

6971

7072
New features
@@ -172,6 +174,40 @@ Improved error messages
172174
ValueError: too many values to unpack (expected 3, got 4)
173175
174176
177+
.. _whatsnew314-pep741:
178+
179+
PEP 741: Python Configuration C API
180+
-----------------------------------
181+
182+
Add a :ref:`PyInitConfig C API <pyinitconfig_api>` to configure the Python
183+
initialization without relying on C structures and the ability to make
184+
ABI-compatible changes in the future.
185+
186+
Complete the :pep:`587` :ref:`PyConfig C API <pyconfig_api>` by adding
187+
:c:func:`PyInitConfig_AddModule` which can be used to add a built-in extension
188+
module; feature previously referred to as the “inittab”.
189+
190+
Add :c:func:`PyConfig_Get` and :c:func:`PyConfig_Set` functions to get and set
191+
the current runtime configuration.
192+
193+
PEP 587 “Python Initialization Configuration” unified all the ways to configure
194+
the Python initialization. This PEP unifies also the configuration of the
195+
Python preinitialization and the Python initialization in a single API.
196+
Moreover, this PEP only provides a single choice to embed Python, instead of
197+
having two “Python” and “Isolated” choices (PEP 587), to simplify the API
198+
further.
199+
200+
The lower level PEP 587 PyConfig API remains available for use cases with an
201+
intentionally higher level of coupling to CPython implementation details (such
202+
as emulating the full functionality of CPython’s CLI, including its
203+
configuration mechanisms).
204+
205+
(Contributed by Victor Stinner in :gh:`107954`.)
206+
207+
.. seealso::
208+
:pep:`741`.
209+
210+
175211
Other language changes
176212
======================
177213

0 commit comments

Comments
 (0)