Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 36 additions & 14 deletions peps/pep-0751.rst
Original file line number Diff line number Diff line change
Expand Up @@ -240,20 +240,19 @@ consistent order. Usage of inline tables SHOULD also be kept consistent.
is, in effect, multi-use even if it only looks to be single-use.


``default-group``
=================
``default-groups``
==================

- **Type**: String
- **Required?**: no
- **Type**: Array of strings
- **Required?**: no; defaults to ``[]``
- **Inspiration**: Poetry_, PDM_
- The name of a synthetic dependency group to represent what should be installed
- The name of synthetic dependency groups to represent what should be installed
by default (e.g. what ``project.dependencies`` implicitly represents).
- Meant to be used in situations where ``packages.marker`` necessitates such a
group to exist.
- The group listed by this key SHOULD NOT be listed in ``dependency-groups`` as
the group is not meant to be directly exposed to users by name but instead via
an installer's UI.
- This group can only be specified when ``dependency-groups`` has values.
- The groups listed by this key SHOULD NOT be listed in ``dependency-groups`` as
the groups are not meant to be directly exposed to users by name but instead
via an installer's UI.


``created-by``
Expand Down Expand Up @@ -802,6 +801,29 @@ operations involving sets:
python_version ~= "surprise"


Fourth, use of ``extras`` and ``depenendency_groups`` will be considered an
error outside of lock file (much like ``extra`` outside of
:ref:`packaging:core-metadata`).

.. code-block:: diff

diff --git a/source/specifications/dependency-specifiers.rst b/source/specifications/dependency-specifiers.rst
index 06897da2..2914ef66 100644
--- a/source/specifications/dependency-specifiers.rst
+++ b/source/specifications/dependency-specifiers.rst
@@ -235,6 +235,11 @@ no current specification for this. Regardless, outside of a context where this
special handling is taking place, the "extra" variable should result in an
error like all other unknown variables.

+The "extras" and "dependency_groups" variables are also special. They are used
+to specify any requested extras or dependency groups when installing from a lock
+file. Outside of the context of lock files, these two variables should result in
+an error like all other unknown variables.
+
.. list-table::
:header-rows: 1


These changes, along with ``packages.extras``/ ``packages.dependency-groups``
and marker expressions' Boolean logic support, allow for expressing arbitrary,
exhaustive requirements for when a package should be installed based on the
Expand Down Expand Up @@ -1075,11 +1097,11 @@ is better or worse than the other, it just changes how much can be written down
in a single file (which can influence how manageable).

Lock files that follow this PEP can be installed by any installer that
implements the specification. This allows users of a lock file to not not be
tied to the locker used by the person who produced the lock file. But it is not
the case that using a different locker will lead to the same result. This could
be for various reasons, including using different algorithms to determine what
to lock.
implements the specification. This allows users of a lock file to perform an
installation to not be tied to the locker used by the person who produced the
lock file. But it is not the case that using a different locker will lead to the
same result. This could be for various reasons, including using different
algorithms to determine what to lock.


========================
Expand Down