@@ -65,6 +65,8 @@ Summary -- release highlights
65
65
66
66
.. PEP-sized items next.
67
67
68
+ * :ref: `PEP 649: deferred evaluation of annotations <whatsnew314-pep649 >`
69
+ * :ref: `PEP 741: Python Configuration C API <whatsnew314-pep741 >`
68
70
69
71
70
72
New features
@@ -172,6 +174,40 @@ Improved error messages
172
174
ValueError: too many values to unpack (expected 3, got 4)
173
175
174
176
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
+
175
211
Other language changes
176
212
======================
177
213
@@ -641,6 +677,14 @@ argparse
641
677
of :class: `!argparse.BooleanOptionalAction `.
642
678
They were deprecated since 3.12.
643
679
680
+ * Calling :meth: `~argparse.ArgumentParser.add_argument_group ` on an argument
681
+ group, and calling :meth: `~argparse.ArgumentParser.add_argument_group ` or
682
+ :meth: `~argparse.ArgumentParser.add_mutually_exclusive_group ` on a mutually
683
+ exclusive group now raise exceptions. This nesting was never supported,
684
+ often failed to work correctly, and was unintentionally exposed through
685
+ inheritance. This functionality has been deprecated since Python 3.11.
686
+ (Contributed by Savannah Ostrowski in :gh: `127186 `.)
687
+
644
688
ast
645
689
---
646
690
0 commit comments