pypa / pypa/packaging

Normalisation and Requirement's `str()`

Open
#644 18 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement packaging.requirements
Dominant language
Python
Stars
751
Forks
324
Avg merge
12h 58m
Merged PRs (30d)
3

Description

If packaging doesn't normalise dependency names when stringifying dependencies, why does it normalise their extras?

Originally posted by @layday in https://github.com/pypa/build/issues/550#issuecomment-1345189462

Build's test suite is broken because packaging 22 is normalizing the extras when producing strings. But it doesn't do this with dependency names. It seems like it should be consistent.

Contributor guide

Open the contributing guide

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 by reviewing packaging's dependency stringification and the Build test-suite failure described in the issue. Compare how dependency names and extras are normalized when converted to strings, then determine the intended consistent behavior and verify that the affected test suite passes.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.