pypi/warehouse

Allow PEP 508 URL requirements in requires_dist

Closed this issue · 1 comments

What's the problem this feature will solve?

I want to put a package on PyPi which uses the new direct url syntaxpkg@git-repo-url from PEP 508. Uploading to PyPi yields
HTTPError: 400 Client Error: Invalid value for requires_dist. Error: Can't have direct dependency:
I have a package which depends on another package which I don't want to go through the trouble of uploading to PyPi as well. This dependency then breaks installing my package from PyPi.

Describe the solution you'd like

Allow PEP 508 URL requirements in requires_dist.

Additional context

Originally reported by @themightyoarfish at pypa/pip#6301

di commented

PEP 440 says:

Public index servers SHOULD NOT allow the use of direct references in uploaded distributions.

PEP 508 says:

Firstly, PEP-440 direct references haven't actually been deployed in the wild, but they were designed to be compatibly added, and there are no known obstacles to adding them to pip or other tools that consume the existing dependency metadata in distributions - particularly since they won't be permitted to be present in PyPI uploaded distributions anyway.

As such, I'm going to close this issue as we have no plans to deviate from these PEPs, but thanks for the report.