Skip to content

Enable storage retention for pypi - #441

Merged
andrew merged 3 commits into
git-pkgs:mainfrom
pinguinfuss:issue-306-retention-pypi
Oct 12, 2026
Merged

andrew merged 3 commits into
git-pkgs:mainfrom
pinguinfuss:issue-306-retention-pypi

Conversation

@pinguinfuss

Copy link
Copy Markdown
Contributor

Refs #306, builds on #428.

Registers pypi for storage.retention.

PyPI names are stored the way purl normalizes them: lowercased, and _ turned into -. So Typing_Extensions and typing-extensions hit the same package. Dots aren't normalized, though, and runs like __ aren't collapsed. That means zope.interface and zope_interface files end up under two packages, and the docs say to add a rule for each. Storing names per PEP 503 would fix that, but it changes how existing rows are keyed, so it's left for a separate PR.

The mirror can't fetch PyPI files today, so there's no mirror test.

PyPI names are stored the way purl normalizes them, lowercased and with _ turned into -, so Typing_Extensions and typing-extensions hit the same package. The mirror can't fetch PyPI files today, so there's no mirror test.

Refs git-pkgs#306
Dots in PyPI names aren't normalized, so zope.interface and zope_interface files end up under two packages. The docs now say to add a rule for each.

Refs git-pkgs#306
Runs like "__" aren't collapsed either, so a__b is stored as a--b.

Refs git-pkgs#306

@andrew andrew left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

PyPI retention rules match the existing cache keys. The HTTP tests cover eviction, refetching, and package exemptions, and the documentation explains the current name normalization limitations.

@andrew
andrew merged commit 18f410d into git-pkgs:main Oct 12, 2026
6 checks passed
@pinguinfuss
pinguinfuss deleted the issue-306-retention-pypi branch October 12, 2026 15:04
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.

2 participants