pypa / twine

Utilities for interacting with PyPI
https://twine.readthedocs.io/
Apache License 2.0
1.61k stars 308 forks source link

twine: use API tokens by default on PyPI #1040

Closed woodruffw closed 10 months ago

woodruffw commented 10 months ago

This is still a work in progress.

See #561.

woodruffw commented 10 months ago

I think this is good for an initial look. Key behavioral changes:

Some design questions:

miketheman commented 10 months ago
  • Should we do the same for TestPyPI? I'm not sure if it's also 2FA mandated

It is!

woodruffw commented 10 months ago

I'm on my phone so I may be wrong, but it looks like we don't have tests for repositories other than pypi which means we don't have a way of verifying things don't break for non-PyPI users. Is that right?

Yep, that's right -- I'll add those complementing tests tonight!

woodruffw commented 10 months ago

I've added mirror PyPI/non-PyPI tests for the testcases that diverged with these changes.

I've also manually confirmed that the prompt gets specialized as expected, e.g.:

$ twine upload -r testpypi dist/twine-0.1.dev1105+g6e94d20.tar.gz
Uploading distributions to https://test.pypi.org/legacy/
Enter your API token:
190488 commented 1 month ago

This is still a work in progress.

See #561.

Correlation Id: df1b91f7ccc14a179c323bfcf542ec6b Timestamp: 2024-09-15T21:26:26.704Z

190488 commented 1 month ago

Correlation Id: df1b91f7ccc14a179c323bfcf542ec6b Timestamp: 2024-09-15T21:26:26.704Z