-
Notifications
You must be signed in to change notification settings - Fork 326
upload: warn the user if their signature(s) are ignored #1010
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
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -124,6 +124,19 @@ def upload(upload_settings: settings.Settings, dists: List[str]) -> None: | |
| _make_package(filename, signatures, upload_settings) for filename in uploads | ||
| ] | ||
|
|
||
| # Warn the user if they're trying to upload a PGP signature to PyPI | ||
| # or TestPyPI, which will (as of May 2023) ignore it. | ||
| # This check is currently limited to just those indices, since other | ||
| # indices may still support PGP signatures. | ||
| if ( | ||
| any(p.gpg_signature for p in packages_to_upload) | ||
| and "pypi.org" in repository_url | ||
| ): | ||
| logger.warning( | ||
| "One or more packages has an associated PGP signature; " | ||
| "these will be silently ignored by the index" | ||
| ) | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. NB: I put this in its own little region rather than embedding it in the distribution loop below, under the reasoning that (1) it probably only makes sense to warn once here, and (2) this might get removed eventually anyways, so a less complex diff is better. Happy to move if you'd prefer it in the loop, though! |
||
|
|
||
| repository = upload_settings.create_repository() | ||
| uploaded_packages = [] | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.