mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-07 21:35:00 +00:00
Publish: Warn when keyring has no password (#8827)
When trying to upload without a password but with the keyring, check that the keyring has a password for the upload URL and username and warn if it doesn't. Fixes #8781
This commit is contained in:
parent
68e3228f2b
commit
0b0d0f44f8
6 changed files with 166 additions and 10 deletions
|
@ -10,7 +10,7 @@ class KeyringTest(backend.KeyringBackend):
|
|||
|
||||
def get_password(self, service, username):
|
||||
print(f"Request for {username}@{service}", file=sys.stderr)
|
||||
credentials = json.loads(os.environ.get("KEYRING_TEST_CREDENTIALS") or {})
|
||||
credentials = json.loads(os.environ.get("KEYRING_TEST_CREDENTIALS", "{}"))
|
||||
return credentials.get(service, {}).get(username)
|
||||
|
||||
def set_password(self, service, username, password):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue