@@ -124,17 +124,25 @@ def upload(upload_settings: settings.Settings, dists: List[str]) -> None:
124124 _make_package (filename , signatures , upload_settings ) for filename in uploads
125125 ]
126126
127- # Warn the user if they're trying to upload a PGP signature to PyPI
128- # or TestPyPI, which will (as of May 2023) ignore it.
129- # This check is currently limited to just those indices, since other
130- # indices may still support PGP signatures.
131- if any (p .gpg_signature for p in packages_to_upload ) and repository_url .startswith (
132- (utils .DEFAULT_REPOSITORY , utils .TEST_REPOSITORY )
133- ):
134- logger .warning (
135- "One or more packages has an associated PGP signature; "
136- "these will be silently ignored by the index"
137- )
127+ if any (p .gpg_signature for p in packages_to_upload ):
128+ if repository_url .startswith ((utils .DEFAULT_REPOSITORY , utils .TEST_REPOSITORY )):
129+ # Warn the user if they're trying to upload a PGP signature to PyPI
130+ # or TestPyPI, which will (as of May 2023) ignore it.
131+ # This warning is currently limited to just those indices, since other
132+ # indices may still support PGP signatures.
133+ logger .warning (
134+ "One or more packages has an associated PGP signature; "
135+ "these will be silently ignored by the index"
136+ )
137+ else :
138+ # On other indices, warn the user that twine is considering
139+ # removing PGP support outright.
140+ logger .warning (
141+ "One or more packages has an associated PGP signature; "
142+ "a future version of twine may silently ignore these. "
143+ "See https://github.com/pypa/twine/issues/1009 for more "
144+ "information"
145+ )
138146
139147 repository = upload_settings .create_repository ()
140148 uploaded_packages = []
0 commit comments