@@ -66,18 +66,39 @@ man pages][netrc-docs].
66
66
## Keyring Support
67
67
68
68
pip supports loading credentials stored in your keyring using the
69
- {pypi}` keyring ` library.
69
+ {pypi}` keyring-subprocess ` library.
70
+
71
+ ``` {note}
72
+ In the previous versions Pip would import {pypi}`keyring` from its environment.
73
+ Now Pip vendors `keyring` and `keyring-subprocess`. Pip will query a
74
+ `keyring-subprocess` executable if it can be found on the PATH.
75
+
76
+ This should make bootstrapping virtualenvs easier. The `virtualenv` library has
77
+ a mechanism to seed (pre install) packages into new virtualenvs, but Python's
78
+ venv module does not.
79
+
80
+ The upside of vendoring keyring this way is that is will work for both flavours
81
+ of virtualenvs.
82
+
83
+ The downside is that this is a breaking change for existing `keyring` users,
84
+ they now need to opt in by installing `keyring-subprocess[landmark]`.
85
+ ```
70
86
71
87
``` bash
72
- $ pip install keyring # install keyring from PyPI
88
+ $ # install keyring-subprocess[landmark] and make it available on the PATH
89
+ $ # and possibly additional keyring backends such
90
+ $ # - artifacts-keyring for Azure DevOps
91
+ $ # - keyrings.google-artifactregistry-auth for Google Artifact Registry
73
92
$ echo " your-password" | keyring set pypi.company.com your-username
74
93
$ pip install your-package --index-url https://pypi.company.com/
75
94
```
76
95
77
- Note that ` keyring ` (the Python package) needs to be installed separately from
78
- pip. This can create a bootstrapping issue if you need the credentials stored in
79
- the keyring to download and install keyring.
96
+ Note that ` keyring-subprocess[landmark] ` (the Python package) needs to be
97
+ installed separately from pip. This can create a bootstrapping issue if you
98
+ need the credentials stored in the keyring to download and install keyring.
80
99
81
100
It is, thus, expected that users that wish to use pip's keyring support have
82
- some mechanism for downloading and installing {pypi}` keyring ` in their Python
83
- environment.
101
+ some mechanism for downloading and installing ` keyring-subprocess[landmark] ` .
102
+ There is a powershell script for Windows on the {pypi}` keyring-subprocess `
103
+ project page to install pipx and then install it with pipx. It should be able
104
+ to serve as a handy cheat sheet for other platforms.
0 commit comments