mirror of https://github.com/pypa/pip
Upgrade requests to 2.25.0
This commit is contained in:
parent
1c6a119529
commit
1604ac4737
|
@ -0,0 +1 @@
|
||||||
|
Upgrade requests to 2.25.0
|
|
@ -57,10 +57,10 @@ def check_compatibility(urllib3_version, chardet_version):
|
||||||
# Check urllib3 for compatibility.
|
# Check urllib3 for compatibility.
|
||||||
major, minor, patch = urllib3_version # noqa: F811
|
major, minor, patch = urllib3_version # noqa: F811
|
||||||
major, minor, patch = int(major), int(minor), int(patch)
|
major, minor, patch = int(major), int(minor), int(patch)
|
||||||
# urllib3 >= 1.21.1, <= 1.25
|
# urllib3 >= 1.21.1, <= 1.26
|
||||||
assert major == 1
|
assert major == 1
|
||||||
assert minor >= 21
|
assert minor >= 21
|
||||||
assert minor <= 25
|
assert minor <= 26
|
||||||
|
|
||||||
# Check chardet for compatibility.
|
# Check chardet for compatibility.
|
||||||
major, minor, patch = chardet_version.split('.')[:3]
|
major, minor, patch = chardet_version.split('.')[:3]
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
__title__ = 'requests'
|
__title__ = 'requests'
|
||||||
__description__ = 'Python HTTP for Humans.'
|
__description__ = 'Python HTTP for Humans.'
|
||||||
__url__ = 'https://requests.readthedocs.io'
|
__url__ = 'https://requests.readthedocs.io'
|
||||||
__version__ = '2.24.0'
|
__version__ = '2.25.0'
|
||||||
__build__ = 0x022400
|
__build__ = 0x022500
|
||||||
__author__ = 'Kenneth Reitz'
|
__author__ = 'Kenneth Reitz'
|
||||||
__author_email__ = 'me@kennethreitz.org'
|
__author_email__ = 'me@kennethreitz.org'
|
||||||
__license__ = 'Apache 2.0'
|
__license__ = 'Apache 2.0'
|
||||||
|
|
|
@ -273,7 +273,9 @@ class PreparedRequest(RequestEncodingMixin, RequestHooksMixin):
|
||||||
"""The fully mutable :class:`PreparedRequest <PreparedRequest>` object,
|
"""The fully mutable :class:`PreparedRequest <PreparedRequest>` object,
|
||||||
containing the exact bytes that will be sent to the server.
|
containing the exact bytes that will be sent to the server.
|
||||||
|
|
||||||
Generated from either a :class:`Request <Request>` object or manually.
|
Instances are generated from a :class:`Request <Request>` object, and
|
||||||
|
should not be instantiated manually; doing so may produce undesirable
|
||||||
|
effects.
|
||||||
|
|
||||||
Usage::
|
Usage::
|
||||||
|
|
||||||
|
|
|
@ -387,6 +387,13 @@ class Session(SessionRedirectMixin):
|
||||||
self.stream = False
|
self.stream = False
|
||||||
|
|
||||||
#: SSL Verification default.
|
#: SSL Verification default.
|
||||||
|
#: Defaults to `True`, requiring requests to verify the TLS certificate at the
|
||||||
|
#: remote end.
|
||||||
|
#: If verify is set to `False`, requests will accept any TLS certificate
|
||||||
|
#: presented by the server, and will ignore hostname mismatches and/or
|
||||||
|
#: expired certificates, which will make your application vulnerable to
|
||||||
|
#: man-in-the-middle (MitM) attacks.
|
||||||
|
#: Only set this to `False` for testing.
|
||||||
self.verify = True
|
self.verify = True
|
||||||
|
|
||||||
#: SSL client certificate default, if String, path to ssl client
|
#: SSL client certificate default, if String, path to ssl client
|
||||||
|
@ -495,7 +502,12 @@ class Session(SessionRedirectMixin):
|
||||||
content. Defaults to ``False``.
|
content. Defaults to ``False``.
|
||||||
:param verify: (optional) Either a boolean, in which case it controls whether we verify
|
:param verify: (optional) Either a boolean, in which case it controls whether we verify
|
||||||
the server's TLS certificate, or a string, in which case it must be a path
|
the server's TLS certificate, or a string, in which case it must be a path
|
||||||
to a CA bundle to use. Defaults to ``True``.
|
to a CA bundle to use. Defaults to ``True``. When set to
|
||||||
|
``False``, requests will accept any TLS certificate presented by
|
||||||
|
the server, and will ignore hostname mismatches and/or expired
|
||||||
|
certificates, which will make your application vulnerable to
|
||||||
|
man-in-the-middle (MitM) attacks. Setting verify to ``False``
|
||||||
|
may be useful during local development or testing.
|
||||||
:param cert: (optional) if String, path to ssl client cert file (.pem).
|
:param cert: (optional) if String, path to ssl client cert file (.pem).
|
||||||
If Tuple, ('cert', 'key') pair.
|
If Tuple, ('cert', 'key') pair.
|
||||||
:rtype: requests.Response
|
:rtype: requests.Response
|
||||||
|
|
|
@ -169,14 +169,20 @@ def super_len(o):
|
||||||
def get_netrc_auth(url, raise_errors=False):
|
def get_netrc_auth(url, raise_errors=False):
|
||||||
"""Returns the Requests tuple auth for a given url from netrc."""
|
"""Returns the Requests tuple auth for a given url from netrc."""
|
||||||
|
|
||||||
|
netrc_file = os.environ.get('NETRC')
|
||||||
|
if netrc_file is not None:
|
||||||
|
netrc_locations = (netrc_file,)
|
||||||
|
else:
|
||||||
|
netrc_locations = ('~/{}'.format(f) for f in NETRC_FILES)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from netrc import netrc, NetrcParseError
|
from netrc import netrc, NetrcParseError
|
||||||
|
|
||||||
netrc_path = None
|
netrc_path = None
|
||||||
|
|
||||||
for f in NETRC_FILES:
|
for f in netrc_locations:
|
||||||
try:
|
try:
|
||||||
loc = os.path.expanduser('~/{}'.format(f))
|
loc = os.path.expanduser(f)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
# os.path.expanduser can fail when $HOME is undefined and
|
# os.path.expanduser can fail when $HOME is undefined and
|
||||||
# getpwuid fails. See https://bugs.python.org/issue20164 &
|
# getpwuid fails. See https://bugs.python.org/issue20164 &
|
||||||
|
@ -212,7 +218,7 @@ def get_netrc_auth(url, raise_errors=False):
|
||||||
if raise_errors:
|
if raise_errors:
|
||||||
raise
|
raise
|
||||||
|
|
||||||
# AppEngine hackiness.
|
# App Engine hackiness.
|
||||||
except (ImportError, AttributeError):
|
except (ImportError, AttributeError):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ packaging==20.4
|
||||||
pep517==0.9.1
|
pep517==0.9.1
|
||||||
progress==1.5
|
progress==1.5
|
||||||
pyparsing==2.4.7
|
pyparsing==2.4.7
|
||||||
requests==2.24.0
|
requests==2.25.0
|
||||||
certifi==2020.06.20
|
certifi==2020.06.20
|
||||||
chardet==3.0.4
|
chardet==3.0.4
|
||||||
idna==2.10
|
idna==2.10
|
||||||
|
|
Loading…
Reference in New Issue