forked from urllib3/urllib3
-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
34 changed files
with
237 additions
and
3,080 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ | |
import typing | ||
import warnings | ||
from logging import NullHandler | ||
from os import environ | ||
|
||
from . import exceptions | ||
from ._base_connection import _TYPE_BODY | ||
|
@@ -31,36 +32,13 @@ | |
except ImportError: | ||
pass | ||
else: | ||
if not ssl.OPENSSL_VERSION.startswith("OpenSSL "): # Defensive: | ||
warnings.warn( | ||
"urllib3 v2.0 only supports OpenSSL 1.1.1+, currently " | ||
f"the 'ssl' module is compiled with {ssl.OPENSSL_VERSION!r}. " | ||
"See: https://github.com/urllib3/urllib3/issues/3020", | ||
exceptions.NotOpenSSLWarning, | ||
) | ||
elif ssl.OPENSSL_VERSION_INFO < (1, 1, 1): # Defensive: | ||
if ssl.OPENSSL_VERSION_INFO < (1, 1, 1): # Defensive: | ||
raise ImportError( | ||
"urllib3 v2.0 only supports OpenSSL 1.1.1+, currently " | ||
f"the 'ssl' module is compiled with {ssl.OPENSSL_VERSION!r}. " | ||
"See: https://github.com/urllib3/urllib3/issues/2168" | ||
) | ||
|
||
# === NOTE TO REPACKAGERS AND VENDORS === | ||
# Please delete this block, this logic is only | ||
# for urllib3 being distributed via PyPI. | ||
# See: https://github.com/urllib3/urllib3/issues/2680 | ||
try: | ||
import urllib3_secure_extra # type: ignore # noqa: F401 | ||
except ModuleNotFoundError: | ||
pass | ||
else: | ||
warnings.warn( | ||
"'urllib3[secure]' extra is deprecated and will be removed " | ||
"in urllib3 v2.1.0. Read more in this issue: " | ||
"https://github.com/urllib3/urllib3/issues/2680", | ||
category=DeprecationWarning, | ||
stacklevel=2, | ||
) | ||
|
||
__author__ = "Andrey Petrov ([email protected])" | ||
__license__ = "MIT" | ||
|
@@ -114,6 +92,13 @@ def add_stderr_logger( | |
del NullHandler | ||
|
||
|
||
if environ.get("SSHKEYLOGFILE", None) or environ.get("QUICLOGDIR", None): | ||
warnings.warn( | ||
"""urllib3 detected that development/debug environment variable are set. If you are not aware of it | ||
please audit your environment. Look for variables 'SSHKEYLOGFILE' and 'QUICLOGDIR'.""", | ||
exceptions.SecurityWarning, | ||
) | ||
|
||
# All warning filters *must* be appended unless you're really certain that they | ||
# shouldn't be: otherwise, it's very hard for users to use most Python | ||
# mechanisms to silence them. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# This file is protected via CODEOWNERS | ||
from __future__ import annotations | ||
|
||
__version__ = "2.0.936" | ||
__version__ = "2.1.900" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Oops, something went wrong.