Skip to content

Commit 421bb91

Browse files
committed
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.
1 parent 63993ba commit 421bb91

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

source/specifications/direct-url-data-structure.rst

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,16 @@ This document specifies a JSON-serializable abstract data structure that can rep
1010
URLs to python projects and distribution artifacts such as VCS source trees, local
1111
source trees, source distributions and wheels.
1212

13-
The representation of the components of this data structure as a :rfc:`1738` URL
14-
is not formally specified at time of writing. A common representation is the pip URL
15-
format. Other examples are provided in the :ref:`Version specifier specification <version-specifiers>`.
16-
17-
1813
Specification
1914
=============
2015

2116
The Direct URL Data Structure MUST be a dictionary, serializable to JSON according to
2217
:rfc:`8259`.
2318

2419
It MUST contain at least two fields. The first one is ``url``, with
25-
type ``string``. Depending on what ``url`` refers to, the second field MUST be
26-
one of ``vcs_info`` (if ``url`` is a VCS reference), ``archive_info`` (if
20+
type ``string``. Its content must be a valid URL according to the
21+
`WHATWG URL Standard <whatwg-url-standard_>`_. Depending on what ``url`` refers to,
22+
the second field MUST be one of ``vcs_info`` (if ``url`` is a VCS reference), ``archive_info`` (if
2723
``url`` is a source archives or a wheel), or ``dir_info`` (if ``url`` is a
2824
local directory). These info fields have a (possibly empty) subdictionary as
2925
value, with the possible keys defined below.
@@ -396,3 +392,4 @@ History
396392

397393

398394
.. _archive-info-hashes: https://discuss.python.org/t/22299
395+
.. _whatwg-url-standard: https://url.spec.whatwg.org/

0 commit comments

Comments
 (0)