Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix dot handling in dist-info directory name #253

Merged
merged 6 commits into from
Nov 24, 2020

Conversation

uranusjr
Copy link
Contributor

When searching for a matching dist-info directory, try to escape dots in the name segment. This makes functions like distribution() able to accept PEP 503 normalized names to locate a distribution’s dist-info directory
if the distribution’s name contains dots.

Related discussions:

When searching for a matching dist-info directory, try to escape dots in
the name segment. This makes functions like distribution() able to accept
PEP 503 normalized names to locate a distribution's dist-info directory
if the distribution's name contains dots.
tests/fixtures.py Outdated Show resolved Hide resolved
tests/test_api.py Outdated Show resolved Hide resolved
@jaraco
Copy link
Member

jaraco commented Nov 22, 2020

In the subsequent commits, I've added tests to capture both the desired normalization behavior, but also capture support for the dot-based metadata as "legacy".

@jaraco jaraco changed the base branch from master to maint/2.x November 22, 2020 18:06
@jaraco
Copy link
Member

jaraco commented Nov 22, 2020

I've targeted this PR at the maint/2.x branch so it can be rolled out for users on Python 3.5 and 2.7.

@jaraco jaraco closed this Nov 22, 2020
@jaraco jaraco reopened this Nov 22, 2020
@jaraco jaraco closed this Nov 22, 2020
@jaraco jaraco reopened this Nov 22, 2020
@jaraco
Copy link
Member

jaraco commented Nov 22, 2020

Please let me know what you think of this implementation. If you're happy enough with it, I'll merge and push it out as 2.1 and 3.1.

@uranusjr
Copy link
Contributor Author

Everything looks to me now 👍

@jaraco jaraco merged commit dd25a38 into python:maint/2.x Nov 24, 2020
@uranusjr uranusjr deleted the search-dot-in-dist-info branch November 24, 2020 00:32
@jaraco
Copy link
Member

jaraco commented Dec 1, 2020

FYI, this change has caused a regression in discovery of versionless distributions still using the dot (#261).

jaraco added a commit that referenced this pull request Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants