From dd5432fcbdb6a104fc8007a6130c6080a358e15e Mon Sep 17 00:00:00 2001 From: Stefan Kopieczek Date: Wed, 8 May 2024 16:07:29 +0100 Subject: [PATCH] Document Session.verify precedence Add docs warning to indicate that setting REQUESTS_CA_BUNDLE or CURL_CA_BUNDLE causes Session.verify to be ignored. --- docs/user/advanced.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/user/advanced.rst b/docs/user/advanced.rst index ff3a3d0f26..f3b8bb4451 100644 --- a/docs/user/advanced.rst +++ b/docs/user/advanced.rst @@ -238,6 +238,9 @@ or persistent:: This list of trusted CAs can also be specified through the ``REQUESTS_CA_BUNDLE`` environment variable. If ``REQUESTS_CA_BUNDLE`` is not set, ``CURL_CA_BUNDLE`` will be used as fallback. +.. warning:: Changes to ``session.verify`` will be ignored if either + ``REQUESTS_CA_BUNDLE`` or ``CURL_CA_BUNDLE`` is set. + Requests can also ignore verifying the SSL certificate if you set ``verify`` to False:: >>> requests.get('https://kennethreitz.org', verify=False)