From bc83f1febe9a3b913e090c6b19c8c3a5f8317b9a Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Tue, 4 Mar 2025 20:07:13 -0800 Subject: [PATCH 1/3] PEP 751: mention dependency groups for services to look for --- peps/pep-0751.rst | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/peps/pep-0751.rst b/peps/pep-0751.rst index a729a4a2512..76994114038 100644 --- a/peps/pep-0751.rst +++ b/peps/pep-0751.rst @@ -135,11 +135,16 @@ e.g.: if len(filename) > 11 and filename.startswith("pylock.") and filename.endswith(".toml"): name = filename.removeprefix("pylock.").removesuffix(".toml") -The expectation is that services that install lock files automatically will -search for a lock file with the service's name, then fallback to the generic -``pylock.toml`` (e.g. a cloud host service named Spam would first look for +The expectation is that services that automatically install from lock files will +search for: + +1. A lock file with the service's name +2. ``pylock.toml`` with a dependency group with the name of the service +3. The default install with ``pylock.toml`` + +E.g. a cloud host service named "spam" would first look for ``pylock.spam.toml`` to install, and if that file didn't exist then install from -``pylock.toml``). +``pylock.toml`` and look for a dependency group named "spam" fo use if present. The lock file(s) SHOULD be located in the directory as appropriate for the scope of the lock file. Locking against a single ``pyproject.toml``, for instance, From b8daeedd3c955dc4aef53a0425f931e73bc601bd Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Tue, 4 Mar 2025 20:10:57 -0800 Subject: [PATCH 2/3] Clarify using "single" and "multi" --- peps/pep-0751.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/peps/pep-0751.rst b/peps/pep-0751.rst index 76994114038..86eccc6c7e4 100644 --- a/peps/pep-0751.rst +++ b/peps/pep-0751.rst @@ -138,9 +138,9 @@ e.g.: The expectation is that services that automatically install from lock files will search for: -1. A lock file with the service's name -2. ``pylock.toml`` with a dependency group with the name of the service -3. The default install with ``pylock.toml`` +1. A single-use lock file with the service's name +2. A multi-use ``pylock.toml`` with a dependency group with the name of the service +3. The default install of ``pylock.toml`` (single- or multi-use) E.g. a cloud host service named "spam" would first look for ``pylock.spam.toml`` to install, and if that file didn't exist then install from From 9e97361bc958bf9487c78055a5b9e652e06f9694 Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Tue, 4 Mar 2025 20:13:12 -0800 Subject: [PATCH 3/3] Clarify lock file installation instructions --- peps/pep-0751.rst | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/peps/pep-0751.rst b/peps/pep-0751.rst index 86eccc6c7e4..394a3746a3f 100644 --- a/peps/pep-0751.rst +++ b/peps/pep-0751.rst @@ -138,13 +138,14 @@ e.g.: The expectation is that services that automatically install from lock files will search for: -1. A single-use lock file with the service's name +1. The lock file with the service's name and doing the default install 2. A multi-use ``pylock.toml`` with a dependency group with the name of the service -3. The default install of ``pylock.toml`` (single- or multi-use) +3. The default install of ``pylock.toml`` E.g. a cloud host service named "spam" would first look for -``pylock.spam.toml`` to install, and if that file didn't exist then install from -``pylock.toml`` and look for a dependency group named "spam" fo use if present. +``pylock.spam.toml`` to install from, and if that file didn't exist then install +from ``pylock.toml`` and look for a dependency group named "spam" fo use if +present. The lock file(s) SHOULD be located in the directory as appropriate for the scope of the lock file. Locking against a single ``pyproject.toml``, for instance,