pypa / pypa/packaging.python.org

Request for clarification on 'extra' marker in Requires-Dist

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

Nobody has claimed this yet.

component: specifications state: needs clarification type: enhancement
Dominant language
Python
Stars
1.7k
Forks
1.7k
Avg merge
3d 12h
Merged PRs (30d)
4

Description

I have been reading the core metadata specification in the packaging guide and would like to request a clarification on the following section:

https://packaging.python.org/en/latest/specifications/core-metadata/#provides-extra-multiple-use

and specifically the following example:

Provides-Extra: pdf
Requires-Dist: reportlab; extra == 'pdf'

It seems like extra behaves somewhat like an environment marker, but I wanted to check whether == is the only valid supported comparison? Or could one in principle do:

Provides-Extra: pdf
Requires-Dist: reportlab; extra != 'pdf'

If someone can clarify whether this is also legal, I can try and propose a change for the spec to add a clarification.

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 the core metadata specification section linked in the issue, especially the Provides-Extra example and its environment-marker rules. Determine whether comparisons other than == are legal for extra, then clarify the specification or identify the wording that needs updating; the issue is done when the rule is unambiguous.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.