Let us walk on the 3-isogeny graph
Loading...
Searching...
No Matches
pip._internal.utils.inject_securetransport Namespace Reference

Functions

None inject_securetransport ()
 

Detailed Description

A helper module that injects SecureTransport, on import.

The import should be done as early as possible, to ensure all requests and
sessions (or whatever) are created after injecting SecureTransport.

Note that we only do the injection on macOS, when the linked OpenSSL is too
old to handle TLSv1.2.

Function Documentation

◆ inject_securetransport()

None inject_securetransport ( )

Definition at line 13 of file inject_securetransport.py.

13def 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
33
34
for i

References i, and pip._internal.utils.inject_securetransport.inject_securetransport().

Referenced by pip._internal.utils.inject_securetransport.inject_securetransport().

Here is the call graph for this function:
Here is the caller graph for this function: