jaraco / keyring

MIT License
1.24k stars 152 forks source link

Windows 11 terminal hanging #615

Closed 2010person closed 1 year ago

2010person commented 1 year ago

Password section in hanging in Windows 11 Command Prompt A clear and concise description of what the bug is. This bug is the password hanging when I use the twine module (and the twine module uses keyring)

To Reproduce Steps to reproduce the behavior:

  1. Install the twine module (when said below).
  2. Make a blank local python module (https://packaging.python.org/en/latest/tutorials/packaging-projects/)
  3. Enter this command: py -m twine upload --repository testpypi dist/*
  4. Enter username (for everybody - __token__)
  5. See error - not able to enter password.

Expected behavior I expect that you will be unable to enter your password as it will hang repeatedly.

Environment

Additional context

2010person commented 1 year ago

Just to add, in the twine module repository, they say that it is a keyring error as keyring is one of their dependencies, so that is why I came here.

jaraco commented 1 year ago

I tried to replicate the issue but was unsuccessful:

PS C:\Users\jaraco> pipx install twine
  installed package twine 4.0.2, installed using Python 3.11.0b3
  These apps are now globally available
    - twine.exe
done! ✨ 🌟 ✨
PS C:\Users\jaraco> pipx inject twine keyring
  injected package keyring into venv twine
done! ✨ 🌟 ✨
PS C:\Users\jaraco\draft> py -m pip wheel --no-deps setuptools
Collecting setuptools
  Using cached setuptools-67.2.0-py3-none-any.whl (1.1 MB)
Saved c:\users\jaraco\draft\setuptools-67.2.0-py3-none-any.whl

[notice] A new release of pip available: 22.1.2 -> 23.0
[notice] To update, run: C:\Program Files\Python311-arm64\python.exe -m pip install --upgrade pip
PS C:\Users\jaraco\draft> twine upload .\setuptools-67.2.0-py3-none-any.whl
Uploading distributions to https://upload.pypi.org/legacy/
Enter your username: jaraco
Enter your password:
Uploading setuptools-67.2.0-py3-none-any.whl
100% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.1/1.1 MB • 00:00 • 5.4 MB/s
WARNING  Error during upload. Retry with the --verbose option for more details.
ERROR    HTTPError: 403 Forbidden from https://upload.pypi.org/legacy/
         Invalid or non-existent authentication information. See https://pypi.org/help/#invalid-auth for more
         information.

As you can see, it prompted me for a password and tried to use that password.

I don't see any error and nothing hangs indefinitely.

I did go to the twine project and while I didn't find any comments from 2010person, I did find https://github.com/pypa/twine/issues/671, which seems related. Lots of troubleshooting ideas there.

In any case, I don't believe this is an issue with keyring.

2010person commented 1 year ago

Ok thanks, sorry for bothering you.