Skip to content
Myr

Merge pull request #6068 from nateprewitt/sess_prox_warn

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

Reword proxies section and add warning

authored by Ian Stapleton Cordasco · committed by GitHub · parents 3eed051, 15fde02 · Browse files · 1 file+13 added−4 removed
This commit

State

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

Diff stats

1 file+13 added−4 removed

  • other:+13 added−4 removed

1 file+13 added−4 removed

modified:docs/user/advanced.rst+13 added-4 removed
601 unmodified lines
602 session.proxies.update(proxies)603604 session.get('http://example.org')605606.. warning:: Setting ``session.proxies`` may behave differently than expected.607 Values provided will be overwritten by environmental proxies608 (those returned by `urllib.request.getproxies <https://docs.python.org/3/library/urllib.request.html#urllib.request.getproxies>`_).609 To ensure the use of proxies in the presence of environmental proxies,610 explicitly specify the ``proxies`` argument on all individual requests as611 initially explained above.612613 See `#2018 <https://github.com/psf/requests/issues/2018>`_ for details.614606When the proxies configuration is not overridden in python as shown above,607by default Requests relies on the proxy configuration defined by standard608environment variables ``http_proxy``, ``https_proxy``, ``no_proxy``, 609``curl_ca_bundle``, and ``all_proxy``. Uppercase variants of these variables are also supported.615When the proxies configuration is not overridden per request as shown above,616Requests relies on the proxy configuration defined by standard617environment variables ``http_proxy``, ``https_proxy``, ``no_proxy``,618and ``all_proxy``. Uppercase variants of these variables are also supported.619You can therefore set them to configure Requests (only set the ones relevant620to your needs)::621622 $ export HTTP_PROXY="http://10.10.1.10:3128"
478 unmodified lines