From 5ab039da5d2e89b13dd211157edcd0441d7eb022 Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Fri, 28 Mar 2025 20:03:26 -0700 Subject: [PATCH] PEP 751: address some minor user feedback Made it explicit that `dependency-groups` represents the groups users are expected to be able to set via a tool's UI. Also made clear what `extras` and `dependency_groups` should be set to by default. --- peps/pep-0751.rst | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/peps/pep-0751.rst b/peps/pep-0751.rst index 2f12b113cfc..fef01bbaf60 100644 --- a/peps/pep-0751.rst +++ b/peps/pep-0751.rst @@ -229,7 +229,9 @@ consistent order. Usage of inline tables SHOULD also be kept consistent. - **Type**: Array of strings - **Required?**: no; defaults to ``[]`` - **Inspiration**: :ref:`packaging:pyproject-tool-table` -- The list of :ref:`packaging:dependency-groups` supported by this lock file. +- The list of :ref:`packaging:dependency-groups` publicly supported by this lock + file (i.e. dependency groups users are expected to be able to specify via a + tool's UI). - Lockers MAY choose to not support writing lock files that support extras and dependency groups (i.e. tools may only support exporting a single-use lock file). @@ -907,6 +909,13 @@ The following outlines the steps to be taken to install from a lock file (while the requirements are prescriptive, the general steps and order are a suggestion): +#. Gather the extras and dependency groups to install and set ``extras`` and + ``dependency_groups`` for marker evaluation, respectively. + + #. ``extras`` SHOULD be set to the empty set by default. + #. ``dependency_groups`` SHOULD be the set created from ``default-groups`` by + default. + #. Check if the metadata version specified by ``lock-version`` is supported; an error or warning MUST be raised as appropriate. #. If ``requires-python`` is specified, check that the environment being