fix(pypi): stop reporting a package's publisher as the account holder - #562
Draft
brunolm wants to merge 1 commit into
Draft
fix(pypi): stop reporting a package's publisher as the account holder#562brunolm wants to merge 1 commit into
brunolm wants to merge 1 commit into
Conversation
Release metadata credits whoever published a package, so folding author_email/maintainer_email into extra["email"] presented a co-maintainer's or a mailing list's address as the account's own, and author/maintainer under display_name did the same for their name. Both key names are read as claims about the account holder. Emit them under keys that name their source, and report every distinct value across the sampled packages rather than the first one an alphabetical walk happened to reach.
brunolm
force-pushed
the
fix/email-key-classification
branch
2 times, most recently
from
August 9, 2026 21:25
18fe4a3 to
ca0e9cd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
tl;dr
author_emailwas emitted asemailandauthorasdisplay_name, so scanninghugovkpublished a defunct company's address and name as that account's own.author,author_email,maintainer,maintainer_email.Package metadata is not the account holder's
Before. Both values come from
PILβ first package alphabetically, published bySecret Labs AB in the 1990s β and the account owner appears nowhere:
After:
Three changes produce that:
emailβauthor_email/maintainer_email,display_nameβauthor/maintaineremail.utils.getaddresses"A <a@x>, B <b@y>"and"Thomas Kluyver & contributors <thomas@β¦>"no longer mangleCost:
min(5, packages)requests every time, where a lucky first package used tocost 1. That is the ceiling the old loop already hit whenever it found nothing.
Keys changed
email,display_nameauthor,author_email,maintainer,maintainer_emailNeither removed key has another reader in the repo β the
display_namehits incore/orchestrator.pyandcore/email_orchestrator.pyare a local variableholding a category label. Consumers of the exported JSON/CSV/PDF that key off
the old names need updating.
Testing
hugovk<pypi-user-c>author, no emailauthoronly<pypi-user-b>packages_count+packagesonlyzzznotarealuser99xzqNot covered:
_package_info's request-failure path, a package crediting twodistinct
maintainer_emails, and the PDF exporter β the key rename was checkedby
grep, not by rendering every format.