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

Remove non all PEP503 conformant paths #455

Merged
merged 1 commit into from
Mar 16, 2020
Merged

Conversation

cooperlees
Copy link
Contributor

  • PEP503 says we only need to store the normalized path / name for packages
  • Moderns pip supports this
  • Lets remove the legacy normalization and 1.5 non normalized directories for simple html
  • Also make package.py full mypy / PEP484 compliant

Have made a note in documentation about this.

Tests:

  • Update tests to only expect normalized directories

Fixes #138

@cooperlees cooperlees added enhancement New feature or request 4.0 labels Mar 16, 2020
- PEP503 says we only need to store the normalized path / name for packages
- Moderns pip supports this
- Lets remove the legacy normalization and 1.5 non normalized directories for simple html
- Also make package.py full mypy / PEP484 compliant

Have made a note in documentation about this.

Tests:
- Update tests to only expect normalized directories

Fixes #138
@codecov
Copy link

codecov bot commented Mar 16, 2020

Codecov Report

Merging #455 into master will decrease coverage by 0.30%.
The diff coverage is 70.37%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #455      +/-   ##
==========================================
- Coverage   82.08%   81.77%   -0.31%     
==========================================
  Files          10       10              
  Lines        1133     1114      -19     
  Branches      173      167       -6     
==========================================
- Hits          930      911      -19     
- Misses        161      162       +1     
+ Partials       42       41       -1     
Impacted Files Coverage Δ
src/bandersnatch/package.py 79.75% <70.37%> (-1.45%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 79c9646...ac833ae. Read the comment docs.

Copy link
Member

@techalchemy techalchemy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems good to me, and as far as I can tell it's correct for normalization in the modern age and I don't think you should need to keep supporting versions of pip that old

@@ -64,28 +66,18 @@ def normalized_simple_directory(self) -> Path:
)
return self.mirror.webdir / "simple" / self.normalized_name
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so the difference here is the legacy format used a parent directory with the first letter as the top level directory name? I just want to be sure I understand correctly what is going away

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As we discussed on IRC - Just the PEP's normalization function rather than some arbitrary one from back in the day in distutils.

This will also cause less to be on disk.

@cooperlees cooperlees merged commit c1dc2d7 into master Mar 16, 2020
@cooperlees cooperlees deleted the remove_pip_8x_hacks branch March 16, 2020 21:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Look at removing old Pip 1.5 + 8.x hacks in package.py
2 participants