Skip to content
Myr

Preferentially use certifi to requests.

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

authored by Cory Benfield · committed by Cory Benfield · parent 39f0c66 · Browse files · 1 file+7 added−6 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+7 added−6 removed

  • other:+7 added−6 removed

1 file+7 added−6 removed

modified:requests/certs.py+7 added-6 removed
9 unmodified lines
10If you are packaging Requests, e.g., for a Linux distribution or a managed11environment, you can change the definition of where() to return a separately12packaged CA bundle.13"""1414import os.path1516try:17 from certifi import where18except ImportError:19 def where():20 """Return the preferred certificate bundle."""21 # vendored bundle inside Requests22 return os.path.join(os.path.dirname(__file__), 'cacert.pem')2318def where():19 """Return the preferred certificate bundle."""20 # vendored bundle inside Requests21 return os.path.join(os.path.dirname(__file__), 'cacert.pem')2224if __name__ == '__main__':25 print(where())