pypa / pypa/packaging.python.org

What base URL are relative dependency specifiers resolved against?

Open
#1,861 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1.7k
Forks
1.7k
Avg merge
3d 12h
Merged PRs (30d)
4

Description

Issue Description

https://packaging.python.org/en/latest/specifications/dependency-specifiers/ allows a URI_reference:

https://github.com/pypa/packaging.python.org/blob/59dabe84d29d596e93b516daea7484b453b152c3/source/specifications/dependency-specifiers.rst#L71

Where URI_reference is defined as:

https://github.com/pypa/packaging.python.org/blob/59dabe84d29d596e93b516daea7484b453b152c3/source/specifications/dependency-specifiers.rst#L387

Thus, it is valid to write my-amazing-package @ ../../this-is-a-path.

However, it doesn't appear to be defined what base URL is used to resolve the relative URL, even in the "simple" case of a dependency specifier in a pyproject.toml file.

Code of Conduct
  • I am aware that participants in this repository must follow the PSF Code of Conduct.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with source/specifications/dependency-specifiers.rst, especially the referenced URI_reference definition and dependency-specifier text. Trace how relative references are described for a dependency in pyproject.toml, then document the applicable base URL or clarify that the specification needs a decision. Done means the specification answers this resolution question unambiguously.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.