Skip to content

Commit d00d696

Browse files
committed
Merge branch 'main' into some-pfmoore-comments
2 parents 2491b0b + 69ae438 commit d00d696

File tree

8 files changed

+510
-161
lines changed

8 files changed

+510
-161
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -658,6 +658,7 @@ peps/pep-0776.rst @hoodmane @ambv
658658
peps/pep-0777.rst @warsaw
659659
# ...
660660
peps/pep-0779.rst @Yhg1s @colesbury @mpage
661+
peps/pep-0780.rst @lysnikolaou
661662
# ...
662663
peps/pep-0789.rst @njsmith
663664
# ...

peps/pep-0751.rst

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ consistent order. Usage of inline tables SHOULD also be kept consistent.
235235
file).
236236
- Tools supporting dependency groups MUST also support extras.
237237
- Tools SHOULD explicitly set this key to an empty array to signal that the
238-
inputs used to generate the lock file had no extras (e.g. a ``pyproject.toml``
238+
inputs used to generate the lock file had no dependency groups (e.g. a ``pyproject.toml``
239239
file had no ``[dependency-groups]`` table), signalling that the lock file
240240
is, in effect, multi-use even if it only looks to be single-use.
241241

@@ -361,6 +361,7 @@ consistent order. Usage of inline tables SHOULD also be kept consistent.
361361
contains.
362362
- Tools MAY choose to not support version control systems, both from a locking
363363
and/or installation perspective.
364+
- Tools MAY choose to only support a subset of the available VCS types.
364365
- Tools SHOULD provide a way for users to opt in/out of using version control
365366
systems.
366367
- Installation from a version control system is considered originating from a
@@ -1094,7 +1095,7 @@ use-cases based on extras and dependency groups. It is up to the tool(s) you use
10941095
that decide whether multi-use lock files are possible. All tools dealing with
10951096
lock files at least support single-use lock files. Neither type of lock file
10961097
is better or worse than the other, it just changes how much can be written down
1097-
in a single file (which can influence how manageable).
1098+
in a single file.
10981099

10991100
Lock files that follow this PEP can be installed by any installer that
11001101
implements the specification. This allows users of a lock file to perform an
@@ -1269,7 +1270,7 @@ Recording the creation date of the lock file
12691270
============================================
12701271

12711272
To know how potentially stale the lock file was, an earlier proposal suggested
1272-
recording the creation date of the lock file. But for some same merge conflict
1273+
recording the creation date of the lock file. But for the same merge conflict
12731274
reasons as storing the hash of the file contents, this idea was dropped.
12741275

12751276

@@ -1315,7 +1316,7 @@ Drop recording the package version
13151316
==================================
13161317

13171318
The package version is optional since it can only be reliably recorded when an
1318-
sdist of wheel file is used. And since both sources record the version in file
1319+
sdist or wheel file is used. And since both sources record the version in file
13191320
names it is technically redundant.
13201321

13211322
But in discussions it was decided the version number is useful for auditing
@@ -1470,7 +1471,9 @@ Acknowledgements
14701471

14711472
Thanks to everyone who participated in the discussions on discuss.python.org.
14721473
Also thanks to Randy Döring, Seth Michael Larson, Paul Moore, and Ofek Lev for
1473-
providing feedback on a draft version of this PEP before going public.
1474+
providing feedback on a draft version of this PEP before going public. Thanks to
1475+
Randy Döring of Poetry, Charlie Marsh of uv, and Frost Ming of PDM for providing
1476+
feedback on behalf of their respective projects.
14741477

14751478

14761479
=========

peps/pep-0755.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,9 @@ Grant Ownership
154154
---------------
155155

156156
The owner of a grant may allow any number of other organizations to use the
157-
grant. The grants behave as if they were owned by the organization. The owner
158-
may revoke this permission at any time.
157+
grant. The grants behave as if they were owned by the organization, i.e. even
158+
the owner cannot upload packages to the namespace. The owner may revoke this
159+
permission at any time.
159160

160161
The owner may transfer ownership to another organization at any time without
161162
approval from PyPI admins. If the organization is a paid organization, the

peps/pep-0765.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ PEP: 765
22
Title: Disallow return/break/continue that exit a finally block
33
Author: Irit Katriel <irit@python.org>, Alyssa Coghlan <ncoghlan@gmail.com>
44
Discussions-To: https://discuss.python.org/t/pep-765-disallow-return-break-continue-that-exit-a-finally-block/71348
5-
Status: Accepted
5+
Status: Final
66
Type: Standards Track
77
Created: 15-Nov-2024
88
Python-Version: 3.14
@@ -11,6 +11,7 @@ Post-History: `09-Nov-2024 <https://discuss.python.org/t/an-analysis-of-return-i
1111
Replaces: 601
1212
Resolution: https://discuss.python.org/t/71348/111
1313

14+
.. canonical-doc:: :external+py3.14:ref:`finally`
1415

1516
Abstract
1617
========

peps/pep-0768.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@ PEP: 768
22
Title: Safe external debugger interface for CPython
33
Author: Pablo Galindo Salgado <pablogsal@python.org>, Matt Wozniski <godlygeek@gmail.com>, Ivona Stojanovic <stojanovic.i@hotmail.com>
44
Discussions-To: https://discuss.python.org/t/pep-768-safe-external-debugger-interface-for-cpython/73969
5-
Status: Draft
5+
Status: Accepted
66
Type: Standards Track
77
Created: 25-Nov-2024
88
Python-Version: 3.14
99
Post-History: `11-Dec-2024 <https://discuss.python.org/t/pep-768-safe-external-debugger-interface-for-cpython/73969>`__
10+
Resolution: `17-Mar-2025 <https://discuss.python.org/t/pep-768-safe-external-debugger-interface-for-cpython/73969/57>`__
1011

1112
Abstract
1213
========

peps/pep-0770.rst

Lines changed: 21 additions & 151 deletions
Original file line numberDiff line numberDiff line change
@@ -153,26 +153,19 @@ can projects begin using the new features. Even with this careful approach it's
153153
not guaranteed that tools won't break on new metadata versions and fields.
154154

155155
To avoid this delay, simplify overall how to include SBOMs, and to give
156-
flexibility to build backends and tools, this PEP proposes a new top-level table
157-
in ``pyproject.toml``, ``[dist-info.files]``, to safely add data to a Python
158-
package through a registry of reserved names that
159-
avoids the need for new metadata fields and versions. This mechanism allows
160-
build backends and tools to begin using the features described in this PEP
161-
immediately after acceptance without the head-of-line blocking on other
162-
projects adopting the PEP.
163-
164-
A new top-level table was chosen over using the ``[project]`` table because,
165-
as described in :pep:`621`, the ``[project]`` table is used for storing core
166-
metadata and this mechanism doesn't use core metadata.
156+
flexibility to build backends and tools, this PEP proposes using a subdirectory
157+
under ``.dist-info`` to safely add data to a Python package while avoiding the
158+
need for new metadata fields and versions. This mechanism allows build backends
159+
and tools to begin using the feature described in this PEP immediately after
160+
acceptance without the head-of-line blocking on other projects adopting the PEP.
167161

168162
Storing files in the ``.dist-info`` or ``.data`` directory
169163
----------------------------------------------------------
170164

171165
There are two top-level directories in binary distributions where files beyond
172166
the software itself can be stored: ``.dist-info`` and ``.data``.
173167
This specification chose to use the ``.dist-info`` directory for storing
174-
subdirectories and files from the new ``[dist-info.files]`` top-level table
175-
for two reasons:
168+
subdirectories and files.
176169

177170
Firstly, the ``.data`` directory has no corresponding location in the installed
178171
package, compared to ``.dist-info`` which does preserve the link between the
@@ -231,37 +224,18 @@ Specification
231224

232225
The changes necessary to implement this PEP include:
233226

234-
* Explicitly reserving all subdirectory names in the ``.dist-info`` directory.
235-
* A new registry of reserved subdirectory names in the ``.dist-info`` directory.
236-
* An optional top-level table, ``[dist-info.files]``, added to
237-
`project source metadata <770-spec-project-source-metadata_>`_,
238-
* An optional ``sboms`` key in the new ``[dist-info.files]`` table,
227+
* Explicitly reserving the subdirectory ``.dist-info/sboms``.
239228
* `Additions <770-spec-project-formats_>`_ to the built distribution (wheel),
240229
and installed project specifications
241230

242231
In addition to the above, an informational PEP will be created for tools
243232
consuming included SBOM documents and other Python package metadata to
244233
generate complete SBOM documents for Python packages.
245234

246-
.. _770-spec-dist-info-subdirs:
247-
248-
Reserving all subdirectory names in ``.dist-info``
249-
--------------------------------------------------
250-
251-
This PEP explicitly reserves all subdirectory names in the ``.dist-info``
252-
directory for future usage.
253-
254-
Build backends MUST NOT create subdirectories in the ``.dist-info`` directory
255-
beyond the names in the `registry <770-spec-dist-info-subdirs-registry>`_
256-
to avoid collisions with future reserved names.
257-
258-
Build frontends and publishing tools MAY warn users if any ``.dist-info``
259-
subdirectories aren't in the registry.
260-
261235
.. _770-spec-dist-info-subdirs-registry:
262236

263-
Registry of reserved ``.dist-info`` subdirectory names
264-
------------------------------------------------------
237+
Reserving the ``.dist-info/sboms`` directory
238+
--------------------------------------------
265239

266240
This PEP introduces a new registry of reserved subdirectory names allowed in
267241
the ``.dist-info`` directory for the :term:`distribution archive`
@@ -278,88 +252,7 @@ Subdirectory name PEP / Standard
278252
================= ==============
279253

280254
See :ref:`770-backwards-compat` for a complete methodology for
281-
creating this initial set of values to avoid backwards incompatibility issues.
282-
283-
.. _770-spec-project-source-metadata:
284-
285-
Project source metadata
286-
-----------------------
287-
288-
This PEP specifies changes to the project's source metadata
289-
in the ``pyproject.toml`` file:
290-
291-
Add new ``[dist-info.files]`` table
292-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
293-
294-
A new optional ``[dist-info.files]`` table is added for specifying paths
295-
in the project source tree relative to ``pyproject.toml`` to file(s) which
296-
should be included in the built project to a subdirectory of ``.dist-info``.
297-
298-
This new table has only one defined optional key: ``sboms``. The value of the
299-
``sboms`` key MUST be an array of valid glob patterns, as specified below:
300-
301-
* Alphanumeric characters, underscores (``_``), hyphens (``-``) and dots (``.``)
302-
MUST be matched verbatim.
303-
* Special glob characters: ``*``, ``?``, ``**`` and character ranges: ``[]``
304-
containing only the verbatim matched characters MUST be supported. Within
305-
``[...]``, the hyphen indicates a locale-agnostic range (e.g. a-z, order based
306-
on Unicode code points). Hyphens at the start or end are matched literally.
307-
* Path delimiters MUST be the forward slash character (``/``). Patterns are
308-
relative to the directory containing ``pyproject.toml``, therefore the leading
309-
slash character MUST NOT be used.
310-
* Parent directory indicators (``..``) MUST NOT be used.
311-
312-
Any characters or character sequences not covered by this specification are
313-
invalid. Projects MUST NOT use such values. Tools consuming this field SHOULD
314-
reject invalid values with an error.
315-
316-
Literal paths (e.g. ``bom.cdx.json``) are treated as valid globs which means
317-
they can also be defined.
318-
319-
Build tools:
320-
321-
* MUST treat each value in the array as a glob pattern, and MUST raise an error
322-
if the pattern contains invalid glob syntax.
323-
* MUST include all files matched by a listed pattern in all distribution
324-
archives under the ``.dist-info/sboms`` directory.
325-
* MUST raise an error if any individual user-specified pattern does not match
326-
at least one file.
327-
328-
If the ``sboms`` key is present and is set to a value of an empty array,
329-
then tools MUST NOT include any SBOM files and MUST NOT raise an error.
330-
331-
Examples of valid SBOM files declarations:
332-
333-
.. code-block:: toml
334-
335-
[dist-info.files]
336-
sboms = ["bom.json"]
337-
338-
[dist-info.files]
339-
sboms = ["sboms/openssl.cdx.json", "sboms/openssl.spdx.json"]
340-
341-
[dist-info.files]
342-
sboms = ["sboms/*"]
343-
344-
[dist-info.files]
345-
sboms = []
346-
347-
Examples of invalid SBOM files declarations:
348-
349-
.. code-block:: toml
350-
351-
[dist-info.files]
352-
sboms = ["..\bom.json"]
353-
354-
Reason: ``..`` must not be used. ``\\`` is an invalid path delimiter, ``/``
355-
must be used.
356-
357-
.. code-block:: toml
358-
359-
[dist-info.files]
360-
sboms = ["bom{.json*"]
361-
362-
Reason: ``bom{.json*`` is not a valid glob.
255+
avoiding backwards incompatibilities with selecting this directory name.
363256

364257
.. _770-spec-project-formats:
365258

@@ -368,12 +261,6 @@ SBOM files in project formats
368261

369262
A few additions will be made to the existing specifications.
370263

371-
:term:`Project source trees <Project source tree>`
372-
Per :ref:`770-spec-project-source-metadata` section, the
373-
`Declaring Project Metadata specification <pyprojecttoml_>`__
374-
will be updated to add the ``[dist-info.files]`` table
375-
and optional ``sboms`` key.
376-
377264
:term:`Built distributions <Built distribution>` (:term:`wheels <wheel>`)
378265
The wheel specification will be updated to add the new registry of reserved
379266
directory names and to reflect that if the ``.dist-info/sboms`` subdirectory
@@ -420,10 +307,10 @@ SBOM standards, versions, or fields.
420307
Backwards Compatibility
421308
=======================
422309

423-
Reserved ``.dist-info`` subdirectories registry
424-
-----------------------------------------------
310+
Reserved ``.dist-info/sboms`` subdirectory
311+
------------------------------------------
425312

426-
The new registry of reserved ``.dist-info`` subdirectories represents
313+
The new reserved ``.dist-info/sboms`` subdirectory represents
427314
a new reservation that wasn't previously documented, thus has the potential to
428315
break assumptions being made by already existing tools.
429316

@@ -521,23 +408,6 @@ Typically tools can automatically annotate bundled dependencies when those
521408
dependencies come from a "packaging ecosystem" (such as PyPI, Linux distros,
522409
Crates.io, NPM, etc).
523410

524-
For packages which cannot be automatically annotated and if the package author
525-
wishes to provide an SBOM the approach will be to generate or author SBOM files
526-
and then include those files using ``pyproject.toml``:
527-
528-
.. code-block:: toml
529-
530-
[dist-info.files]
531-
sboms = [
532-
"sboms/bom.cdx.json"
533-
]
534-
535-
For projects manually specifying an SBOM document the challenge will be
536-
keeping the document up-to-date. The CPython project has some
537-
`customized tooling <https://github.com/python/cpython/blob/main/Tools/build/generate_sbom.py>`__
538-
for this task, but it can likely be generalized into a tool reusable by other
539-
projects.
540-
541411
What do SBOM tool authors need to know?
542412
---------------------------------------
543413

@@ -644,11 +514,12 @@ user-involvement or knowledge. Compare this situation to license files which
644514
are almost always static.
645515

646516
The 639-style approach was ultimately dropped in favor of defining SBOMs simply
647-
by their presence in the ``.dist-info/sboms`` directory and using a new table in
648-
``pyproject.toml`` called ``[dist-info.files]`` to define SBOMs in source
649-
distributions. This approach allows users to specify static SBOM files while
650-
still empowering build backends and tools to add their own SBOM data without the
651-
static/dynamic conflict.
517+
by their presence in the ``.dist-info/sboms`` directory. This approach allows
518+
build backends and tools to add their own SBOM data without the static/dynamic
519+
conflict.
520+
521+
A future PEP will define the process for statically defining SBOM files to be
522+
added to the ``.dist-info/sboms`` directory.
652523

653524
Open Issues
654525
===========
@@ -686,9 +557,8 @@ Acknowledgements
686557
================
687558

688559
Thanks to Karolina Surma for authoring and leading :pep:`639` to acceptance.
689-
This PEP's initial design was heavily inspired by :pep:`639` and the new
690-
"dist-info.files" mechanism generalizes 639's approach of using a subdirectory
691-
under ``.dist-info``.
560+
This PEP's initial design was heavily inspired by :pep:`639` and adopts a
561+
similar approach of using a subdirectory under ``.dist-info`` to store files.
692562

693563
Copyright
694564
=========

peps/pep-0776.rst

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,23 @@ Packaging Goals
7272
Emscripten Platform Information
7373
===============================
7474

75+
"Pyodide" vs "Emscripten Python"
76+
--------------------------------
77+
78+
For the sake of this document, we use the term "Emscripten Python" to refer to
79+
the Emscripten Python maintained in the ``python/cpython`` repository, without
80+
any downstream additions. We contrast the features present in Emscripten Python
81+
to the features present in Pyodide.
82+
83+
Pyodide is maintained `on GitHub <https://github.com/pyodide/pyodide>`__ and
84+
distributed via `jsDelivr <https://www.jsdelivr.com/oss-cdn/pyodide>`__, `npm
85+
<https://www.npmjs.com/package/pyodide>`__, and `GitHub releases
86+
<https://github.com/pyodide/pyodide/releases>`__.
87+
88+
Emscripten Python is not distributed, but it is possible to build `by following
89+
the instructions in the devguide
90+
<https://devguide.python.org/getting-started/setup-building/#emscripten>`__
91+
7592
Background on Emscripten
7693
------------------------
7794

@@ -792,7 +809,9 @@ Because Emscripten supports POSIX, a significant number of tasks can be achieved
792809
using the ``os`` module. However, many fundamental operations in JavaScript
793810
runtimes are not possible via POSIX APIs. Pyodide's approach is to specify a
794811
mapping between the JavaScript object model and the Python object model and a
795-
calling convention that allows high level bidirectional integration.
812+
calling convention that allows high level bidirectional integration. `See the
813+
Pyodide documentation
814+
<https://pyodide.org/en/stable/usage/type-conversions.html>`__.
796815

797816
Asyncio
798817
~~~~~~~

0 commit comments

Comments
 (0)