mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2025-12-06 17:02:43 +01:00
Update included urllib3 to 1.26.3
This commit is contained in:
parent
becca6e157
commit
115cb44948
3 changed files with 14 additions and 4 deletions
|
|
@ -1,2 +1,2 @@
|
||||||
# This file is protected via CODEOWNERS
|
# This file is protected via CODEOWNERS
|
||||||
__version__ = "1.26.2"
|
__version__ = "1.26.3"
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@ port_by_scheme = {"http": 80, "https": 443}
|
||||||
|
|
||||||
# When it comes time to update this value as a part of regular maintenance
|
# When it comes time to update this value as a part of regular maintenance
|
||||||
# (ie test_recent_date is failing) update it to ~6 months before the current date.
|
# (ie test_recent_date is failing) update it to ~6 months before the current date.
|
||||||
RECENT_DATE = datetime.date(2019, 1, 1)
|
RECENT_DATE = datetime.date(2020, 7, 1)
|
||||||
|
|
||||||
_CONTAINS_CONTROL_CHAR_RE = re.compile(r"[^-!#$%&'*+.^_`|~0-9a-zA-Z]")
|
_CONTAINS_CONTROL_CHAR_RE = re.compile(r"[^-!#$%&'*+.^_`|~0-9a-zA-Z]")
|
||||||
|
|
||||||
|
|
@ -215,7 +215,7 @@ class HTTPConnection(_HTTPConnection, object):
|
||||||
|
|
||||||
def putheader(self, header, *values):
|
def putheader(self, header, *values):
|
||||||
""""""
|
""""""
|
||||||
if SKIP_HEADER not in values:
|
if not any(isinstance(v, str) and v == SKIP_HEADER for v in values):
|
||||||
_HTTPConnection.putheader(self, header, *values)
|
_HTTPConnection.putheader(self, header, *values)
|
||||||
elif six.ensure_str(header.lower()) not in SKIPPABLE_HEADERS:
|
elif six.ensure_str(header.lower()) not in SKIPPABLE_HEADERS:
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
|
|
|
||||||
|
|
@ -289,7 +289,17 @@ class ProxySchemeUnknown(AssertionError, URLSchemeUnknown):
|
||||||
# TODO(t-8ch): Stop inheriting from AssertionError in v2.0.
|
# TODO(t-8ch): Stop inheriting from AssertionError in v2.0.
|
||||||
|
|
||||||
def __init__(self, scheme):
|
def __init__(self, scheme):
|
||||||
message = "Not supported proxy scheme %s" % scheme
|
# 'localhost' is here because our URL parser parses
|
||||||
|
# localhost:8080 -> scheme=localhost, remove if we fix this.
|
||||||
|
if scheme == "localhost":
|
||||||
|
scheme = None
|
||||||
|
if scheme is None:
|
||||||
|
message = "Proxy URL had no scheme, should start with http:// or https://"
|
||||||
|
else:
|
||||||
|
message = (
|
||||||
|
"Proxy URL had unsupported scheme %s, should use http:// or https://"
|
||||||
|
% scheme
|
||||||
|
)
|
||||||
super(ProxySchemeUnknown, self).__init__(message)
|
super(ProxySchemeUnknown, self).__init__(message)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue