From: Shivaram Lingamneni Date: Fri, 18 Jan 2013 04:40:28 +0000 (-0800) Subject: Remove support for certifi X-Git-Tag: v1.2.0~84^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=985a906c6c078356cddedd0b3331031a6a84960c;p=services%2Fpython-requests.git Remove support for certifi As per #1105, certifi is being end-of-lifed. Requests will use either its own vendored bundle, or possibly (when packaged with OS distributions) an externally packaged bundle, which can be enabled by patching requests.certs.where(). --- diff --git a/requests/certs.py b/requests/certs.py index 8148276..752460c 100644 --- a/requests/certs.py +++ b/requests/certs.py @@ -14,17 +14,9 @@ packaged CA bundle. import os.path -certifi = None -try: - import certifi -except ImportError: - pass - def where(): """Return the preferred certificate bundle.""" - if certifi: - return certifi.where() - + # vendored bundle inside Requests return os.path.join(os.path.dirname(__file__), 'cacert.pem') if __name__ == '__main__': diff --git a/requests/utils.py b/requests/utils.py index f5f6b95..34d92d2 100644 --- a/requests/utils.py +++ b/requests/utils.py @@ -28,8 +28,6 @@ _hush_pyflakes = (RequestsCookieJar,) NETRC_FILES = ('.netrc', '_netrc') -# if certifi is installed, use its CA bundle; -# otherwise, try and use the OS bundle DEFAULT_CA_BUNDLE_PATH = certs.where() def dict_to_sequence(d):