From 421bb9157a7cc3050f1e245f2465ba8eef6e617b Mon Sep 17 00:00:00 2001 From: konstin Date: Wed, 21 Feb 2024 10:16:16 +0100 Subject: [PATCH 1/7] RFC: Clarify that the direct_url.json url field must be a spec-compliant url Clarify that the `url` field in `direct_url.json` must be a valid url. --- source/specifications/direct-url-data-structure.rst | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/source/specifications/direct-url-data-structure.rst b/source/specifications/direct-url-data-structure.rst index da4d959e4..01687ded2 100644 --- a/source/specifications/direct-url-data-structure.rst +++ b/source/specifications/direct-url-data-structure.rst @@ -10,11 +10,6 @@ This document specifies a JSON-serializable abstract data structure that can rep URLs to python projects and distribution artifacts such as VCS source trees, local source trees, source distributions and wheels. -The representation of the components of this data structure as a :rfc:`1738` URL -is not formally specified at time of writing. A common representation is the pip URL -format. Other examples are provided in the :ref:`Version specifier specification `. - - Specification ============= @@ -22,8 +17,9 @@ The Direct URL Data Structure MUST be a dictionary, serializable to JSON accordi :rfc:`8259`. It MUST contain at least two fields. The first one is ``url``, with -type ``string``. Depending on what ``url`` refers to, the second field MUST be -one of ``vcs_info`` (if ``url`` is a VCS reference), ``archive_info`` (if +type ``string``. Its content must be a valid URL according to the +`WHATWG URL Standard `_. Depending on what ``url`` refers to, +the second field MUST be one of ``vcs_info`` (if ``url`` is a VCS reference), ``archive_info`` (if ``url`` is a source archives or a wheel), or ``dir_info`` (if ``url`` is a local directory). These info fields have a (possibly empty) subdictionary as value, with the possible keys defined below. @@ -396,3 +392,4 @@ History .. _archive-info-hashes: https://discuss.python.org/t/22299 +.. _whatwg-url-standard: https://url.spec.whatwg.org/ From 9e976ee1e0867453dfc667df55787c3d03220536 Mon Sep 17 00:00:00 2001 From: konstin Date: Wed, 21 Feb 2024 10:56:12 +0100 Subject: [PATCH 2/7] Clarify merging direct_url.json into urls paragraph --- source/specifications/direct-url-data-structure.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/specifications/direct-url-data-structure.rst b/source/specifications/direct-url-data-structure.rst index 01687ded2..26dc39eaa 100644 --- a/source/specifications/direct-url-data-structure.rst +++ b/source/specifications/direct-url-data-structure.rst @@ -10,6 +10,11 @@ This document specifies a JSON-serializable abstract data structure that can rep URLs to python projects and distribution artifacts such as VCS source trees, local source trees, source distributions and wheels. +At time of writing, it is not formally specified how to merge the parts of this +file into single URL that can be passed to tools. A common representation is the +pip URL format, other examples are provided in the +:ref:`Version specifier specification `. + Specification ============= From a8d19777dbe28ce08192e30847485240f8ce6004 Mon Sep 17 00:00:00 2001 From: konstin Date: Wed, 21 Feb 2024 19:36:51 +0100 Subject: [PATCH 3/7] Link to pip docs --- source/specifications/direct-url-data-structure.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/specifications/direct-url-data-structure.rst b/source/specifications/direct-url-data-structure.rst index 26dc39eaa..d9972dc37 100644 --- a/source/specifications/direct-url-data-structure.rst +++ b/source/specifications/direct-url-data-structure.rst @@ -12,7 +12,7 @@ source trees, source distributions and wheels. At time of writing, it is not formally specified how to merge the parts of this file into single URL that can be passed to tools. A common representation is the -pip URL format, other examples are provided in the +pip URL format (`VCS Support `_), other examples are provided in the :ref:`Version specifier specification `. Specification @@ -397,4 +397,5 @@ History .. _archive-info-hashes: https://discuss.python.org/t/22299 +.. _pip-vcs-support: https://pip.pypa.io/en/stable/topics/vcs-support/ .. _whatwg-url-standard: https://url.spec.whatwg.org/ From aad6bf5921e355deeb0f6bf3e8466f077581a35b Mon Sep 17 00:00:00 2001 From: konstin Date: Wed, 21 Feb 2024 19:36:59 +0100 Subject: [PATCH 4/7] New paragraph --- source/specifications/direct-url-data-structure.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/specifications/direct-url-data-structure.rst b/source/specifications/direct-url-data-structure.rst index d9972dc37..a14ebba98 100644 --- a/source/specifications/direct-url-data-structure.rst +++ b/source/specifications/direct-url-data-structure.rst @@ -23,8 +23,10 @@ The Direct URL Data Structure MUST be a dictionary, serializable to JSON accordi It MUST contain at least two fields. The first one is ``url``, with type ``string``. Its content must be a valid URL according to the -`WHATWG URL Standard `_. Depending on what ``url`` refers to, -the second field MUST be one of ``vcs_info`` (if ``url`` is a VCS reference), ``archive_info`` (if +`WHATWG URL Standard `_. + +Depending on what ``url`` refers to, the second field MUST be one of ``vcs_info`` +(if ``url`` is a VCS reference), ``archive_info`` (if ``url`` is a source archives or a wheel), or ``dir_info`` (if ``url`` is a local directory). These info fields have a (possibly empty) subdictionary as value, with the possible keys defined below. From bba849252c4bed9e7a615375eece739496852d02 Mon Sep 17 00:00:00 2001 From: konsti Date: Thu, 22 Feb 2024 10:50:50 +0100 Subject: [PATCH 5/7] Update source/specifications/direct-url-data-structure.rst MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Stéphane Bidoul --- source/specifications/direct-url-data-structure.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/specifications/direct-url-data-structure.rst b/source/specifications/direct-url-data-structure.rst index a14ebba98..9afe5acd5 100644 --- a/source/specifications/direct-url-data-structure.rst +++ b/source/specifications/direct-url-data-structure.rst @@ -11,7 +11,7 @@ URLs to python projects and distribution artifacts such as VCS source trees, loc source trees, source distributions and wheels. At time of writing, it is not formally specified how to merge the parts of this -file into single URL that can be passed to tools. A common representation is the +data structure into single URL that can be passed to tools. A common representation is the pip URL format (`VCS Support `_), other examples are provided in the :ref:`Version specifier specification `. From 66c29296dfe8a0276b05f733eb0bd0d2d8c3e8c4 Mon Sep 17 00:00:00 2001 From: konsti Date: Sat, 2 Mar 2024 16:18:34 +0100 Subject: [PATCH 6/7] Update source/specifications/direct-url-data-structure.rst Co-authored-by: chrysle --- source/specifications/direct-url-data-structure.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/specifications/direct-url-data-structure.rst b/source/specifications/direct-url-data-structure.rst index 9afe5acd5..d73eea4ae 100644 --- a/source/specifications/direct-url-data-structure.rst +++ b/source/specifications/direct-url-data-structure.rst @@ -11,7 +11,7 @@ URLs to python projects and distribution artifacts such as VCS source trees, loc source trees, source distributions and wheels. At time of writing, it is not formally specified how to merge the parts of this -data structure into single URL that can be passed to tools. A common representation is the +data structure into a single URL that can be passed to tools. A common representation is the pip URL format (`VCS Support `_), other examples are provided in the :ref:`Version specifier specification `. From 0f441406f49b28bd8eca6c6258ab743b75f0d342 Mon Sep 17 00:00:00 2001 From: konsti Date: Sat, 2 Mar 2024 16:18:41 +0100 Subject: [PATCH 7/7] typo Co-authored-by: chrysle --- source/specifications/direct-url-data-structure.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/specifications/direct-url-data-structure.rst b/source/specifications/direct-url-data-structure.rst index d73eea4ae..2dbcdae91 100644 --- a/source/specifications/direct-url-data-structure.rst +++ b/source/specifications/direct-url-data-structure.rst @@ -27,7 +27,7 @@ type ``string``. Its content must be a valid URL according to the Depending on what ``url`` refers to, the second field MUST be one of ``vcs_info`` (if ``url`` is a VCS reference), ``archive_info`` (if -``url`` is a source archives or a wheel), or ``dir_info`` (if ``url`` is a +``url`` is a source archive or a wheel), or ``dir_info`` (if ``url`` is a local directory). These info fields have a (possibly empty) subdictionary as value, with the possible keys defined below.