Let us walk on the 3-isogeny graph
Loading...
Searching...
No Matches
inject_securetransport.py
Go to the documentation of this file.
1
"""A helper module that injects SecureTransport, on import.
2
3
The import should be done as early as possible, to ensure all requests and
4
sessions (or whatever) are created after injecting SecureTransport.
5
6
Note that we only do the injection on macOS, when the linked OpenSSL is too
7
old to handle TLSv1.2.
8
"""
9
10
import
sys
11
12
13
def
inject_securetransport
() -> None:
14
# Only relevant on macOS
15
if
sys.platform
!=
"darwin"
:
16
return
17
18
try
:
19
import
ssl
20
except
ImportError:
21
return
22
23
# Checks for OpenSSL 1.0.1
24
if
ssl.OPENSSL_VERSION_NUMBER
>= 0x1000100F:
25
return
26
27
try
:
28
from
pip._vendor.urllib3.contrib
import
securetransport
29
except
(ImportError, OSError):
30
return
31
32
securetransport.inject_into_urllib3
()
33
34
35
inject_securetransport
()
pip._internal.utils.inject_securetransport.inject_securetransport
None inject_securetransport()
Definition
inject_securetransport.py:13
pip._vendor.urllib3.contrib
Definition
_appengine_environ.py:1
i
for i
Definition
prime_search.m:10
venv
lib
python3.12
site-packages
pip
_internal
utils
inject_securetransport.py
Generated by
1.9.8