Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keyring support broken on Windows when keyring.exe is found on PATH after #11589 #11658

Closed
1 task done
Darsstar opened this issue Dec 13, 2022 · 2 comments · Fixed by #11759
Closed
1 task done

Keyring support broken on Windows when keyring.exe is found on PATH after #11589 #11658

Darsstar opened this issue Dec 13, 2022 · 2 comments · Fixed by #11759
Labels
type: bug A confirmed bug or unintended behavior
Milestone

Comments

@Darsstar
Copy link
Contributor

Darsstar commented Dec 13, 2022

Description

#11589 assumes all OSes have \n as the line seperator, that is incorrect for WIndows. Python already has os.linesep which should be used instead.

I included the fix in #11029, which currently is part of the 23.0 milestone.

See #11399 (comment) for additional context.

Expected behavior

os.linesep should be used so the password used by Pip won't end with \r on Windows.

pip version

unreleased

Python version

all

OS

Windows

How to Reproduce

  1. Configure python to use a private repository and be sure to include a username in the url credential section
  2. install keyring somewhere and make sure keyring.exe can only be found via PATH lookup and not by importing it as a package
  3. make sure pip can find the password for the configured url and username combination only via keyring.exe on the PATH
  4. try to pip install something
  5. it will fail because Pip does not strip \r from the password

Output

Looking in indexes:
WARNING: 401 Error, Credentials not correct for

Code of Conduct

@Darsstar Darsstar added S: needs triage Issues/PRs that need to be triaged type: bug A confirmed bug or unintended behavior labels Dec 13, 2022
@uranusjr
Copy link
Member

cc @judahrand

@pradyunsg pradyunsg added this to the 23.0 milestone Jan 9, 2023
@Darsstar
Copy link
Contributor Author

#11698 includes a fix and integration test.

@pradyunsg pradyunsg removed the S: needs triage Issues/PRs that need to be triaged label Jan 28, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug A confirmed bug or unintended behavior
Projects
None yet
3 participants