Skip to content

Commit ce1b46d

Browse files
authored
Merge branch 'main' into pep750-debug-specifier-fix
2 parents 77fe765 + 7424d30 commit ce1b46d

8 files changed

Lines changed: 183 additions & 137 deletions

File tree

peps/pep-0695.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1201,7 +1201,7 @@ A default type argument can be specified using the ``=`` operator.
12011201
.. code-block:: c++
12021202

12031203
// Generic class
1204-
template <typename>
1204+
template <typename T>
12051205
class ClassA
12061206
{
12071207
// Constraints are supported through compile-time assertions.

peps/pep-0710.rst

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,17 @@ contain any entries. In such cases, pip does not create any
446446
is encouraged for consumers to rebuild wheels with a newer version of pip in
447447
these cases.
448448

449+
uv developers `raised a concern about requiring at least one hash
450+
<https://discuss.python.org/t/25428/34>`__ in the ``provenance_url.json`` file
451+
as uv does not calculate distribution hashes unless explicitly required.
452+
However, requiring at least one hash aids in integrity checks for
453+
distributions. This is important in scenarios involving lock files or when
454+
identifying distributions as part of SBOMs. The ``provenance_url.json`` file
455+
mandates the inclusion of at least one hash for the downloaded distribution.
456+
Installers that do not compute hashes of distributions as part of the
457+
installation process (e.g., due to performance reasons) can omit creating the
458+
``provenance_url.json`` file.
459+
449460
Making the hashes key optional
450461
------------------------------
451462

@@ -670,10 +681,10 @@ which this idea originated.
670681
Thanks to Donald Stufft, Ofek Lev, and Trishank Kuppusamy for early feedback
671682
and support to work on this PEP.
672683

673-
Thanks to Gregory P. Smith, Stéphane Bidoul, and C.A.M. Gerlach for
674-
reviewing this PEP and providing valuable suggestions.
684+
Thanks to Gregory P. Smith, Stéphane Bidoul, C.A.M. Gerlach, and Adam Turner
685+
for reviewing this PEP and providing valuable suggestions.
675686

676-
Thanks to Seth Michael Larson for providing valuable suggestions and for
687+
Thanks to Seth Michael Larson for support, providing valuable suggestions and for
677688
the proposed pip-sbom prototype.
678689

679690
Thanks to Stéphane Bidoul and Chris Jerdonek for :pep:`610`, and related
@@ -684,6 +695,8 @@ Thanks to Stéphane Bidoul and Chris Jerdonek for :pep:`610`, and related
684695
Thanks to Frost Ming for raising possible concern around storing index URL in
685696
the ``provenance_url.json`` file and initial PEP 710 support in PDM.
686697

698+
Thanks to Charlie Marsh and Zanie Blue for inputs related to the uv installer.
699+
687700
Last, but not least, thanks to Donald Stufft for sponsoring this PEP.
688701

689702
Copyright

peps/pep-0722.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ Type: Standards Track
88
Topic: Packaging
99
Created: 19-Jul-2023
1010
Post-History: `19-Jul-2023 <https://discuss.python.org/t/29905>`__
11-
Resolution: https://discuss.python.org/t/pep-722-723-decision/36763/
11+
Superseded-By: 723
12+
Resolution: `21-Oct-2023 <https://discuss.python.org/t/pep-722-723-decision/36763/>`__
13+
14+
.. rejected:: This PEP was rejected in favour of :pep:`723`.
1215

1316

1417
Abstract

peps/pep-0728.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ the ``extra_items`` argument::
215215

216216
``extra_items`` is inherited through subclassing::
217217

218-
class MovieBase(TypedDict, extra_items=int | None):
218+
class MovieBase(TypedDict, extra_items=ReadOnly[int | None]):
219219
name: str
220220

221221
class Movie(MovieBase):
@@ -380,6 +380,7 @@ unless it is declared to be ``ReadOnly`` in the superclass::
380380
pass
381381

382382
class Child(Parent, extra_items=int): # Not OK. Like any other TypedDict item, extra_items's type cannot be changed
383+
pass
383384

384385
Second, ``extra_items=T`` effectively defines the value type of any unnamed
385386
items accepted to the TypedDict and marks them as non-required. Thus, the above

peps/pep-0734.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@ PEP: 734
22
Title: Multiple Interpreters in the Stdlib
33
Author: Eric Snow <ericsnowcurrently@gmail.com>
44
Discussions-To: https://discuss.python.org/t/pep-734-multiple-interpreters-in-the-stdlib/41147
5-
Status: Accepted
5+
Status: Final
66
Type: Standards Track
77
Created: 06-Nov-2023
88
Python-Version: 3.14
99
Post-History: `14-Dec-2023 <https://discuss.python.org/t/pep-734-multiple-interpreters-in-the-stdlib/41147/>`__,
1010
Replaces: 554
1111
Resolution: `05-Jun-2025 <https://discuss.python.org/t/41147/36>`__
1212

13+
.. canonical-doc:: :mod:`concurrent.interpreters`
1314

1415
.. note::
1516
This PEP is essentially a continuation of :pep:`554`. That document
@@ -20,7 +21,7 @@ Resolution: `05-Jun-2025 <https://discuss.python.org/t/41147/36>`__
2021

2122
.. note::
2223
This PEP was accepted with the provision that the name change
23-
to :py:mod:`!concurrent.interpreters`.
24+
to :mod:`concurrent.interpreters`.
2425

2526

2627
Abstract

peps/pep-0745.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ Actual:
4747
(No new features beyond this point.)
4848
- 3.14.0 beta 2: Monday, 2025-05-26
4949
- 3.14.0 beta 3: Tuesday, 2025-06-17
50+
- 3.14.0 beta 4: Tuesday, 2025-07-08
5051

5152
Expected:
5253

53-
- 3.14.0 beta 4: Tuesday, 2025-07-08
5454
- 3.14.0 candidate 1: Tuesday, 2025-07-22
5555
- 3.14.0 candidate 2: Tuesday, 2025-08-26
5656
- 3.14.0 final: Tuesday, 2025-10-07

peps/pep-0750.rst

Lines changed: 39 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -400,37 +400,44 @@ Template String Concatenation
400400
-----------------------------
401401

402402
Template strings support explicit concatenation using ``+``. Concatenation is
403-
supported for two ``Template`` instances as well as for a ``Template`` instance
404-
and a ``str``:
403+
supported for two ``Template`` instances via ``Template.__add__()``:
405404

406405
.. code-block:: python
407406
408407
name = "World"
409-
template = t"{name}"
410408
411-
assert isinstance(t"Hello " + template, Template)
412-
assert (t"Hello " + template).strings == ("Hello ", "")
413-
assert (t"Hello " + template).interpolations[0].value == "World"
409+
assert isinstance(t"Hello " + t"{name}", Template)
410+
assert (t"Hello " + t"{name}").strings == ("Hello ", "")
411+
assert (t"Hello " + t"{name}").values[0] == "World"
414412
415-
assert isinstance("Hello " + template, Template)
416-
assert ("Hello " + template).strings == ("Hello ", "")
417-
assert ("Hello " + template).interpolations[0].value == "World"
413+
Implicit concatenation of two template string literals is also supported:
418414

419-
Concatenation of templates is "viral": the concatenation of a ``Template`` and
420-
a ``str`` always results in a ``Template`` instance.
415+
.. code-block:: python
416+
417+
name = "World"
418+
assert isinstance(t"Hello " t"{name}", Template)
419+
assert (t"Hello " t"{name}").strings == ("Hello ", "")
420+
assert (t"Hello " t"{name}").values[0] == "World"
421+
422+
Both implicit and explicit concatenation of ``Template`` and ``str`` is
423+
prohibited. This is because it is ambiguous whether the ``str`` should be
424+
treated as a static string part or as an interpolation.
421425

422-
Python's implicit concatenation syntax is also supported. The following code
423-
will work as expected:
426+
To combine a ``Template`` and a ``str``, developers must explicitly decide how
427+
to treat the ``str``. If the ``str`` is intended to be a static string part,
428+
it should be wrapped in a ``Template``. If the ``str`` is intended to be an
429+
interpolation value, it should be wrapped in an ``Interpolation`` and
430+
passed to the ``Template`` constructor. For example:
424431

425432
.. code-block:: python
426433
427434
name = "World"
428-
assert (t"Hello " t"World").strings == ("Hello World",)
429-
assert ("Hello " t"World").strings == ("Hello World",)
430435
431-
The ``Template`` type supports the ``__add__()`` and ``__radd__()`` methods
432-
between two ``Template`` instances and between a ``Template`` instance and a
433-
``str``.
436+
# Treat `name` as a static string part
437+
template = t"Hello " + Template(name)
438+
439+
# Treat `name` as an interpolation
440+
template = t"Hello " + Template(Interpolation(name, "name"))
434441
435442
436443
Template and Interpolation Equality
@@ -1360,11 +1367,12 @@ Developers who need to obtain the original template string literal can always
13601367
use ``inspect.getsource()`` or similar tools.
13611368

13621369

1363-
Disallowing String Concatenation
1364-
--------------------------------
1370+
Disallowing Template Concatenation
1371+
----------------------------------
13651372

1366-
Earlier versions of this PEP proposed that template strings should not support
1367-
concatenation. This was rejected in favor of allowing concatenation.
1373+
Earlier versions of this PEP proposed that ``Template`` instances should not
1374+
support concatenation. This was rejected in favor of allowing concatenating
1375+
multiple ``Template`` instances.
13681376

13691377
There are reasonable arguments in favor of rejecting one or all forms of
13701378
concatenation: namely, that it cuts off a class of potential bugs, particularly
@@ -1378,13 +1386,16 @@ return a type that supported concatenation.
13781386

13791387
In the end, we decided that the surprise to developers of a new string type
13801388
*not* supporting concatenation was likely to be greater than the theoretical
1381-
harm caused by supporting it. (Developers concatenate f-strings all the time,
1382-
after all, and while we are sure there are cases where this introduces bugs,
1383-
it's not clear that those bugs outweigh the benefits of supporting concatenation.)
1389+
harm caused by supporting it.
1390+
1391+
While concatenation of two ``Templates`` is supported by this PEP, concatenation
1392+
of a ``Template`` and a ``str`` is not supported. This is because it is
1393+
ambiguous whether ``str`` should be treated as a static string or an
1394+
interpolation. Developers must wrap the ``str`` in a ``Template`` instance
1395+
before concatenating it with another ``Template``, as described above.
13841396

1385-
While concatenation is supported, we expect that code that uses template strings
1386-
will more commonly build up larger templates through nesting and composition
1387-
rather than concatenation.
1397+
We expect that code that uses template strings will more commonly build up
1398+
larger templates through nesting and composition rather than concatenation.
13881399

13891400

13901401
Arbitrary Conversion Values

0 commit comments

Comments
 (0)