Skip to content
Myr

Remove support for certifi

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

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().

authored by Shivaram Lingamneni · committed by Shivaram Lingamneni · parent f038f68 · Browse files · 2 files+1 added−11 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+1 added−11 removed

  • other:+1 added−11 removed

2 files+1 added−11 removed

modified:requests/certs.py+1 added-9 removed
12 unmodified lines
13"""1415import os.path1617certifi = None18try:19 import certifi20except ImportError:21 pass2217def where():18 """Return the preferred certificate bundle."""25 if certifi:26 return certifi.where()2719 # vendored bundle inside Requests20 return os.path.join(os.path.dirname(__file__), 'cacert.pem')2122if __name__ == '__main__':23 print(where())
modified:requests/utils.py-2 removed
26 unmodified lines
27_hush_pyflakes = (RequestsCookieJar,)2829NETRC_FILES = ('.netrc', '_netrc')3031# if certifi is installed, use its CA bundle;32# otherwise, try and use the OS bundle31DEFAULT_CA_BUNDLE_PATH = certs.where()3233def dict_to_sequence(d):34 """Returns an internal sequence dictionary update."""
548 unmodified lines