You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Show how to use twine+keyring post 2024-01-01.
This is my attempt to prevent anyone else from being bitten by this change:
`auth.py`
```python
def username(self) -> Optional[str]:
if cast(str, self.config["repository"]).startswith(
(utils.DEFAULT_REPOSITORY, utils.TEST_REPOSITORY)
):
# As of 2024-01-01, PyPI requires API tokens for uploads, meaning
# that the username is invariant.
return "__token__"
```
Co-authored-by: Jason R. Coombs <[email protected]>
0 commit comments