Skip to content
Myr

Fix documentation for the proxies dictionary

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Jason Grout · committed by Jason Grout · parent 500f15d · Browse files · 2 files+6 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+6 added−2 removed

  • other:+6 added−2 removed

2 files+6 added−2 removed

modified:requests/adapters.py+1 added-1 removed
270 unmodified lines
271 when subclassing the272 :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.273274 :param request: The :class:`PreparedRequest <PreparedRequest>` being sent.275 :param proxies: A dictionary of schemes to proxy URLs.275 :param proxies: A dictionary of schemes or schemes and hosts to proxy URLs.276 """277 proxy = select_proxy(request.url, proxies)278 if proxy and not request.url.lower().startswith('https'):279 url = urldefragauth(request.url)
152 unmodified lines
modified:requests/utils.py+5 added-1 removed
536 unmodified lines
537 else:538 return getproxies()539540def select_proxy(url, proxies):541 """Select a proxy, if applicable."""541 """Select a proxy for the url, if applicable.542543 :param url: The url being for the request544 :param proxies: A dictionary of schemes or schemes and hosts to proxy URLs545 """546 proxies = proxies or {}547 urlparts = urlparse(url.lower())548 proxy = proxies.get(urlparts.scheme+'://'+urlparts.hostname)549 if proxy is None:
171 unmodified lines