RFC: Clarify that the direct_url.json url field must be a spec-compliant url#1506
RFC: Clarify that the direct_url.json url field must be a spec-compliant url#1506
Conversation
|
@konstin thanks for this! Could you also announce this PR on discuss.python.org/packaging. Since this could be considered a spec change, it is worth announcing broadly (I personally don't think this change requires a PEP, but better check). |
|
|
I wonder if this is too restricted regarding to git urls. If I understand correctly, you can't just convert a scp-like url to a valid url, cf servo/rust-url#220 and linked issues for example. If you can't convert it what should an installer that supports scp-like urls write into |
|
Wouldn't prefixing them with |
|
I assume for github they are equivalent, but if this statement is correct they are not always equivalent:
I have no idea how common that is. Maybe, that's just an edge case that can be neglected? |
|
FYI: We decided to do the normalization in Poetry for now even if it might not always be equivalent in theory. |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as outdated.
This comment was marked as outdated.
|
@konstin Could you rebase? |
…ant url Clarify that the `url` field in `direct_url.json` must be a valid url.
Co-authored-by: Stéphane Bidoul <[email protected]>
50b66cd to
bba8492
Compare
chrysle
left a comment
There was a problem hiding this comment.
By the way, this document seems to fix the order of fields in the data structure, but I think that is misleading? At least I have seen valid direct_url.json files where it has been swapped.
Co-authored-by: chrysle <[email protected]>
Co-authored-by: chrysle <[email protected]>
|
Thank you! |
Clarify that the
urlfield indirect_url.jsonmust be a valid url. This was prompted by a case where theurlfield contained a value that was not a url (astral-sh/uv#1744). I'm not sure what the best venue to discuss this change is, so i'm putting it up as a PR here.Relatedly, would it make sense to write a json schem for direct_url.json? A machine readable spec would allow tooling to generate types and would simplify verification.
Post on discuss.python.org
Closes #1510 (link check fix)
Thanks to whoever set up nox + sphinx-autobuild,
nox -s previewis great!📚 Documentation preview 📚: https://python-packaging-user-guide--1506.org.readthedocs.build/en/1506/