-
Notifications
You must be signed in to change notification settings - Fork 326
Description
First of all, thank you for twine! I'm a daily user both professionally and personally, and it's been a joy to use.
This is intended to be an RFC/proposal issue for a feature removal, so I've elided some sections below where I believed them to be irrelevant. Please let me know if I re-add them.
The Issue
PyPI removed PGP support in May 2023: since then, pre-existing PGP signatures have continued to be hosted, but new signatures are silently ignored when uploaded alongside a new distribution version.
twine still has a handful of flags and options that reflect PyPI's previous support for PGP, namely --sign, --sign-with, and --identity. These flags still take effect and perform local actions, but ultimately have no effect on the state of the package index. This in turn is a potential source of user confusion: while the index's behavior has been publicly documented, the presence of "supported" PGP/GPG flags on the uploading client side might lead them to believe that some form of PGP signature uploading is still supported or effective.
The Proposal
I propose a deprecation and removal period for these flags, as well as their corresponding parts of the twine codebase. In particular, I propose two discrete phases: a deprecation period during which time these flags cause DeprecationWarnings (or similar), followed by a hard removal period during which the twine CLI no longer recognizes them and exits with a failure code.
The use of a deprecation period here is arguably a little funky, since the underlying behavior has already been removed on the index side. On the other hand there is probably a decent amount of CI/CD automation out there currently using these flags (effectively as no-ops), so giving them a deprecation period before making a breaking change on the twine CLI side will help them perform a graceful migration.
Other considerations
This is intended to be a non-exhaustive list:
- Other indices?
twinesupports uploading to an arbitrary index; are there popular third-party indices that still support PGP signatures? - Alignment with other uploading clients? I don't think Poetry ever supported PGP signatures; I'm not sure about others.
Please let me know what you think! If this proposal seems interesting and valuable, then I'd be more than happy to do the work here.