From c326e307483f5bc3270e480055cf34707849ad35 Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Fri, 13 Mar 2026 16:11:39 -0700 Subject: [PATCH 1/3] Clarify file name precedence for archive, sdist, and wheel specifications in pylock.toml --- source/specifications/pylock-toml.rst | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/source/specifications/pylock-toml.rst b/source/specifications/pylock-toml.rst index 342e608c5..6b4976b5d 100644 --- a/source/specifications/pylock-toml.rst +++ b/source/specifications/pylock-toml.rst @@ -449,7 +449,12 @@ See :ref:`pylock-packages-vcs-subdirectory`. ``packages.archive.url`` '''''''''''''''''''''''' -See :ref:`pylock-packages-vcs-url`. +- **Type**: string +- **Required?**: if :ref:`pylock-packages-archive-path` is not specified +- **Inspiration**: :ref:`direct-url-data-structure-archive` +- The URL_ to the archive. +- If :ref:`pylock-packages-archive-path` is also specified, the filename as + specified by this key takes precedence. .. _pylock-packages-archive-path: @@ -457,7 +462,13 @@ See :ref:`pylock-packages-vcs-url`. ``packages.archive.path`` ''''''''''''''''''''''''' -See :ref:`pylock-packages-vcs-path`. +- **Type**: string +- **Required?**: if :ref:`pylock-packages-archive-url` is not specified +- **Inspiration**: :ref:`direct-url-data-structure-archive` +- The path to the archive. +- If a relative path is used it MUST be relative to the location of this file. +- If the path is relative it MAY use POSIX-style path separators explicitly + for portability. .. _pylock-packages-archive-size: @@ -554,6 +565,8 @@ See :ref:`pylock-packages-vcs-subdirectory`. the same value - **Inspiration**: PDM_, Poetry_, uv_ - The file name of the :ref:`source-distribution-format-sdist` file. +- If specified, this key's value takes precedence over the file name found in + either :ref:`pylock-packages-sdist-url` or :ref:`pylock-packages-sdist-path`. .. _pylock-packages-sdist-upload-time: @@ -623,6 +636,8 @@ See :ref:`pylock-packages-archive-hashes`. the same value - **Inspiration**: PDM_, Poetry_, uv_ - The file name of the :ref:`binary-distribution-format` file. +- If specified, this key's value takes precedence over the file name found in + either :ref:`pylock-packages-sdist-url` or :ref:`pylock-packages-sdist-path`. .. _pylock-packages-wheels-upload-time: @@ -826,6 +841,7 @@ History ------- - April 2025: Initial version, approved via :pep:`751`. +- March 2026: Clarify file name precedence for archives, sdists, and wheels. .. _Content-Length: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Length From 5271c1f1c435f0e64bb4bf71dfeda167cad96ebf Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Wed, 18 Mar 2026 10:00:08 -0700 Subject: [PATCH 2/3] Clarify precedence of archive path and URL --- source/specifications/pylock-toml.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/specifications/pylock-toml.rst b/source/specifications/pylock-toml.rst index 6b4976b5d..bc5cb5413 100644 --- a/source/specifications/pylock-toml.rst +++ b/source/specifications/pylock-toml.rst @@ -453,8 +453,6 @@ See :ref:`pylock-packages-vcs-subdirectory`. - **Required?**: if :ref:`pylock-packages-archive-path` is not specified - **Inspiration**: :ref:`direct-url-data-structure-archive` - The URL_ to the archive. -- If :ref:`pylock-packages-archive-path` is also specified, the filename as - specified by this key takes precedence. .. _pylock-packages-archive-path: @@ -469,6 +467,8 @@ See :ref:`pylock-packages-vcs-subdirectory`. - If a relative path is used it MUST be relative to the location of this file. - If the path is relative it MAY use POSIX-style path separators explicitly for portability. +- If :ref:`pylock-packages-archive-url` is also specified, the filename as + specified by this key takes precedence. .. _pylock-packages-archive-size: From 18ca3fc7f31d834689dd276d88ea094fc4dc63e8 Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Wed, 18 Mar 2026 10:03:20 -0700 Subject: [PATCH 3/3] Fix reference to wheels URL and path in pylock-toml Corrected reference to wheels URL and path in documentation. --- source/specifications/pylock-toml.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/specifications/pylock-toml.rst b/source/specifications/pylock-toml.rst index bc5cb5413..394f9a206 100644 --- a/source/specifications/pylock-toml.rst +++ b/source/specifications/pylock-toml.rst @@ -637,7 +637,7 @@ See :ref:`pylock-packages-archive-hashes`. - **Inspiration**: PDM_, Poetry_, uv_ - The file name of the :ref:`binary-distribution-format` file. - If specified, this key's value takes precedence over the file name found in - either :ref:`pylock-packages-sdist-url` or :ref:`pylock-packages-sdist-path`. + either :ref:`pylock-packages-wheels-url` or :ref:`pylock-packages-wheels-path`. .. _pylock-packages-wheels-upload-time: