Skip to content

Commit fe9bf6f

Browse files
committed
Merge branch 'main' of https://github.com/smurav/cpython
2 parents 365fcee + 4fd9eb2 commit fe9bf6f

18 files changed

Lines changed: 1392 additions & 113 deletions

Doc/c-api/init_config.rst

Lines changed: 4 additions & 0 deletions
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/library/urllib.request.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,12 +159,14 @@ The :mod:`urllib.request` module defines the following functions:
159159
'file:///C:/Program%20Files'
160160

161161
.. versionchanged:: 3.14
162-
Windows drive letters are no longer converted to uppercase.
162+
Paths beginning with a slash are converted to URLs with authority
163+
sections. For example, the path ``/etc/hosts`` is converted to
164+
the URL ``///etc/hosts``.
163165

164166
.. versionchanged:: 3.14
165-
On Windows, ``:`` characters not following a drive letter are quoted. In
166-
previous versions, :exc:`OSError` was raised if a colon character was
167-
found in any position other than the second character.
167+
Windows drive letters are no longer converted to uppercase, and ``:``
168+
characters not following a drive letter no longer cause an
169+
:exc:`OSError` exception to be raised on Windows.
168170

169171

170172
.. function:: url2pathname(url)

Doc/tutorial/errors.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ complaint you get while you are still learning Python::
2323
^^^^^
2424
SyntaxError: invalid syntax
2525

26-
The parser repeats the offending line and displays little 'arrow's pointing
26+
The parser repeats the offending line and displays little arrows pointing
2727
at the token in the line where the error was detected. The error may be
2828
caused by the absence of a token *before* the indicated token. In the
2929
example, the error is detected at the function :func:`print`, since a colon

Doc/whatsnew/3.14.rst

Lines changed: 36 additions & 0 deletions
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)