Skip to content

Commit 9927fc7

Browse files
committed
Use 'multiple-use' terminology for Default-Extra metadata field, and mention that Metadata-Version will need to be bumped
1 parent 077ec36 commit 9927fc7

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

peps/pep-0771.rst

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -91,27 +91,32 @@ Specification
9191
``Default-Extra`` Metadata Field
9292
---------------------------------
9393

94-
A new metadata field, ``Default-Extra``, will be added to the `core package
94+
A new multiple-use metadata field, ``Default-Extra``, will be added to the `core package
9595
metadata <https://packaging.python.org/en/latest/specifications/core-metadata/#core-metadata>`_.
96-
This field allows package maintainers to define an extra that is
97-
automatically included when a user installs the package without specifying any
98-
extras explicitly::
96+
For this field, each entry must be a string specifying an extra that will be
97+
automatically included when the package is installed without any extras specified explicitly.
9998

100-
Default-Extra: recommended
99+
Only entries already specified in a `Provides-Extra
100+
<https://packaging.python.org/en/latest/specifications/core-metadata/#provides-extra-multiple-use>`_
101+
entry can be used in a ``Default-Extra`` entry.
101102

102-
If multiple default extras are needed, one ``Default-Extra:`` entry
103-
must be provided for each one::
103+
Examples::
104104

105+
Default-Extra: recommended
105106
Default-Extra: backend1
106107
Default-Extra: backend2
107108
Default-Extra: backend3
108109

110+
Since this introduces a new field in the core package metadata, this will require
111+
`Metadata-Version <https://packaging.python.org/en/latest/specifications/core-metadata/#metadata-version>`_
112+
to be bumped to the next minor version (2.5 at the time of writing).
113+
109114
New key in ``[project]`` metadata table
110115
---------------------------------------
111116

112117
A new key will be added to the ``[project]`` table in project metadata as
113118
originally defined in :pep:`621` and now defined in the `PyPA specifications
114-
<https://packaging.python.org/en/latest/specifications/>`_. This key will be named
119+
<https://packaging.python.org/en/latest/specifications/pyproject-toml/>`_. This key will be named
115120
``default-optional-dependencies`` with the following description:
116121

117122
* `TOML <https://toml.io/>`_ type: Array of strings

0 commit comments

Comments
 (0)