if cryptography_version < [1, 3, 4]:
warning = "Old version of cryptography ({}) may cause slowdown.".format(
cryptography_version
)
warnings.warn(warning, RequestsDependencyWarning)
# Check imported dependencies for compatibility. try:
check_compatibility(
urllib3.__version__, chardet_version, charset_normalizer_version
) except (AssertionError, ValueError):
warnings.warn( "urllib3 ({}) or chardet ({})/charset_normalizer ({}) doesn't match a supported " "version!".format(
urllib3.__version__, chardet_version, charset_normalizer_version
),
RequestsDependencyWarning,
)
# Attempt to enable urllib3's fallback for SNI support # if the standard library doesn't support SNI or the # 'ssl' library isn't available. try: # Note: This logic prevents upgrading cryptography on Windows, if imported # as part of pip. from pip._internal.utils.compat import WINDOWS ifnot WINDOWS: raise ImportError("pip internals: don't import cryptography on Windows") try: import ssl except ImportError:
ssl = None
ifnot getattr(ssl, "HAS_SNI", False): from pip._vendor.urllib3.contrib import pyopenssl
pyopenssl.inject_into_urllib3()
# Check cryptography version from cryptography import __version__ as cryptography_version
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.