Skip to content

Commit ac244c6

Browse files
committed
network.session: Add a use_keyring option, defaulting to false
Closes pypa#8719
1 parent 510f490 commit ac244c6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/pip/_internal/network/session.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,7 @@ def __init__(self, *args, **kwargs):
234234
cache = kwargs.pop("cache", None)
235235
trusted_hosts = kwargs.pop("trusted_hosts", []) # type: List[str]
236236
index_urls = kwargs.pop("index_urls", None)
237+
use_keyring = kwargs.pop("use_keyring", False)
237238

238239
super().__init__(*args, **kwargs)
239240

@@ -245,7 +246,10 @@ def __init__(self, *args, **kwargs):
245246
self.headers["User-Agent"] = user_agent()
246247

247248
# Attach our Authentication handler to the session
248-
self.auth = MultiDomainBasicAuth(index_urls=index_urls)
249+
self.auth = MultiDomainBasicAuth(
250+
use_keyring=use_keyring,
251+
index_urls=index_urls,
252+
)
249253

250254
# Create our urllib3.Retry instance which will allow us to customize
251255
# how we handle retries.

0 commit comments

Comments
 (0)