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

Support keyring when installed with pipx #11588

Closed
1 task done
judahrand opened this issue Nov 9, 2022 · 6 comments · Fixed by #11589
Closed
1 task done

Support keyring when installed with pipx #11588

judahrand opened this issue Nov 9, 2022 · 6 comments · Fixed by #11589
Labels
type: feature request Request for a new feature

Comments

@judahrand
Copy link
Contributor

What's the problem this feature will solve?

Currently to use keyring it needs to be in the same venv as pip. This seems like an unhelpful limitation as keyring feels like a system-level tool which fits nicely with pipx.

Describe the solution you'd like

Rather than importing keyring pip could call the command line version of the tool. This would work as long as keyring is available in PATH.

Alternative Solutions

Open to suggestions

Additional context

None

Code of Conduct

@judahrand judahrand added S: needs triage Issues/PRs that need to be triaged type: feature request Request for a new feature labels Nov 9, 2022
@pfmoore
Copy link
Member

pfmoore commented Nov 9, 2022

I don't know what the original reasons were for not doing this, but I would strongly suggest reviewing the discussions on the original keyring implementation. There was a lot of debate, and it's unlikely that this option wasn't considered at all.

Also, if we start down this route of using an external command line tool, are we likely to get requests for support for other tools to be added? The keyring support was the source of quite a few issues initially, and I don't think we want to deal with the quirks of multiple password managers...

@judahrand
Copy link
Contributor Author

judahrand commented Nov 9, 2022

That's all very fair, however, the current state of the keyring integration makes its utility rather limited or at the very least frustrating. It isn't a great developer experience to have to run:

pip install keyring
pip install -r requirements.txt

every time.

For those of us using tools like pip-tools this becomes even more annoying as the command becomes:

pip install keyring
pip-sync requirements.txt

which strips keyring back out on the environment. This gets even worse when using plugins like keyrings.google-artifactregistry-auth.

I'd be willing to have a go reimplementing the current keyring integration if a subprocess.run alternative is likely to be accepted.

@judahrand judahrand changed the title Support keyring when install with pipx Support keyring when installed with pipx Nov 9, 2022
@judahrand
Copy link
Contributor Author

Going to have a read of #5952

@judahrand
Copy link
Contributor Author

@pfmoore It doesn't look to me like calling the command line interface was really considered in that original PR 🤔

@pfmoore
Copy link
Member

pfmoore commented Nov 9, 2022

Hmm, that's a bit of a shame. Maybe I misremembered how much discussion there was.

I guess I'm not against this idea, although it's frustrating that we'll then end up with multiple keyring interfaces to support...

@pfmoore
Copy link
Member

pfmoore commented Nov 10, 2022

Thanks for the contribution @judahrand!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 11, 2022
@pradyunsg pradyunsg removed the S: needs triage Issues/PRs that need to be triaged label Jan 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: feature request Request for a new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants