Remove support for certifi
authorShivaram Lingamneni <slingamn@cs.stanford.edu>
Fri, 18 Jan 2013 04:40:28 +0000 (20:40 -0800)
committerShivaram Lingamneni <slingamn@cs.stanford.edu>
Fri, 18 Jan 2013 04:44:01 +0000 (20:44 -0800)
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().

requests/certs.py
requests/utils.py

index 8148276..752460c 100644 (file)
@@ -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__':
index f5f6b95..34d92d2 100644 (file)
@@ -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):