summaryrefslogtreecommitdiffstats
path: root/contrib/python/requests
diff options
context:
space:
mode:
authorrobot-piglet <[email protected]>2025-09-09 11:06:19 +0300
committerrobot-piglet <[email protected]>2025-09-09 11:18:22 +0300
commit3841979f3e9d3eb6d1ddb3e8bc811035d6eaaa77 (patch)
tree2927f0d17070d086284fc8929e9b4e0c1ba5daac /contrib/python/requests
parentd006a8d878da6067998413cb3ab810d8ff6114c8 (diff)
Intermediate changes
commit_hash:01800f12afeaddf33c638ab439853c4c2da593b6
Diffstat (limited to 'contrib/python/requests')
-rw-r--r--contrib/python/requests/py3/.dist-info/METADATA10
-rw-r--r--contrib/python/requests/py3/README.md4
-rw-r--r--contrib/python/requests/py3/patches/01-arcadia.patch8
-rw-r--r--contrib/python/requests/py3/patches/02-hack-for-gevent.patch12
-rw-r--r--contrib/python/requests/py3/requests/__version__.py4
-rw-r--r--contrib/python/requests/py3/requests/adapters.py58
-rw-r--r--contrib/python/requests/py3/requests/sessions.py2
-rw-r--r--contrib/python/requests/py3/ya.make2
8 files changed, 32 insertions, 68 deletions
diff --git a/contrib/python/requests/py3/.dist-info/METADATA b/contrib/python/requests/py3/.dist-info/METADATA
index 837ff4da270..b31773e3ea2 100644
--- a/contrib/python/requests/py3/.dist-info/METADATA
+++ b/contrib/python/requests/py3/.dist-info/METADATA
@@ -1,6 +1,6 @@
Metadata-Version: 2.4
Name: requests
-Version: 2.32.4
+Version: 2.32.5
Summary: Python HTTP for Humans.
Home-page: https://requests.readthedocs.io
Author: Kenneth Reitz
@@ -16,18 +16,18 @@ Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
+Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Software Development :: Libraries
-Requires-Python: >=3.8
+Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: charset_normalizer<4,>=2
@@ -88,7 +88,7 @@ Requests is available on PyPI:
$ python -m pip install requests
```
-Requests officially supports Python 3.8+.
+Requests officially supports Python 3.9+.
## Supported Features & Best–Practices
@@ -115,7 +115,7 @@ Requests is ready for the demands of building robust and reliable HTTP–speakin
## Cloning the repository
When cloning the Requests repository, you may need to add the `-c
-fetch.fsck.badTimezone=ignore` flag to avoid an error about a bad commit (see
+fetch.fsck.badTimezone=ignore` flag to avoid an error about a bad commit timestamp (see
[this issue](https://github.com/psf/requests/issues/2690) for more background):
```shell
diff --git a/contrib/python/requests/py3/README.md b/contrib/python/requests/py3/README.md
index 79cf54d1e15..74adab80dd7 100644
--- a/contrib/python/requests/py3/README.md
+++ b/contrib/python/requests/py3/README.md
@@ -33,7 +33,7 @@ Requests is available on PyPI:
$ python -m pip install requests
```
-Requests officially supports Python 3.8+.
+Requests officially supports Python 3.9+.
## Supported Features & Best–Practices
@@ -60,7 +60,7 @@ Requests is ready for the demands of building robust and reliable HTTP–speakin
## Cloning the repository
When cloning the Requests repository, you may need to add the `-c
-fetch.fsck.badTimezone=ignore` flag to avoid an error about a bad commit (see
+fetch.fsck.badTimezone=ignore` flag to avoid an error about a bad commit timestamp (see
[this issue](https://github.com/psf/requests/issues/2690) for more background):
```shell
diff --git a/contrib/python/requests/py3/patches/01-arcadia.patch b/contrib/python/requests/py3/patches/01-arcadia.patch
index 999df2aaa6a..562053db88f 100644
--- a/contrib/python/requests/py3/patches/01-arcadia.patch
+++ b/contrib/python/requests/py3/patches/01-arcadia.patch
@@ -1,11 +1,11 @@
--- contrib/python/requests/py3/requests/adapters.py (index)
+++ contrib/python/requests/py3/requests/adapters.py (working tree)
@@ -259,1 +259,1 @@ class HTTPAdapter(BaseAdapter):
-- if not os.path.exists(cert_loc):
-+ if isinstance(cert_loc, str) and not os.path.exists(cert_loc):
+- if not cert_loc or not os.path.exists(cert_loc):
++ if not cert_loc or (isinstance(cert_loc, str) and not os.path.exists(cert_loc)):
@@ -267,1 +267,1 @@ class HTTPAdapter(BaseAdapter):
-- if not os.path.isdir(cert_loc):
-+ if not isinstance(cert_loc, str) or not os.path.isdir(cert_loc):
+- if not os.path.isdir(cert_loc):
++ if not isinstance(cert_loc, str) or not os.path.isdir(cert_loc):
--- contrib/python/requests/py3/requests/utils.py (index)
+++ contrib/python/requests/py3/requests/utils.py (working tree)
@@ -260,7 +260,7 @@ def extract_zipped_paths(path):
diff --git a/contrib/python/requests/py3/patches/02-hack-for-gevent.patch b/contrib/python/requests/py3/patches/02-hack-for-gevent.patch
deleted file mode 100644
index b7eea5be8bc..00000000000
--- a/contrib/python/requests/py3/patches/02-hack-for-gevent.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- contrib/python/requests/py3/requests/adapters.py (index)
-+++ contrib/python/requests/py3/requests/adapters.py (working tree)
-@@ -76,7 +76,8 @@ DEFAULT_POOL_TIMEOUT = None
-
- try:
- import ssl # noqa: F401
--
-+ import urllib3.util.ssl_
-+ urllib3.util.ssl_.SSLContext = ssl.SSLContext
- _preloaded_ssl_context = create_urllib3_context()
- _preloaded_ssl_context.load_verify_locations(
- extract_zipped_paths(DEFAULT_CA_BUNDLE_PATH)
diff --git a/contrib/python/requests/py3/requests/__version__.py b/contrib/python/requests/py3/requests/__version__.py
index 3128a4644ec..effdd98cf15 100644
--- a/contrib/python/requests/py3/requests/__version__.py
+++ b/contrib/python/requests/py3/requests/__version__.py
@@ -5,8 +5,8 @@
__title__ = "requests"
__description__ = "Python HTTP for Humans."
__url__ = "https://requests.readthedocs.io"
-__version__ = "2.32.4"
-__build__ = 0x023204
+__version__ = "2.32.5"
+__build__ = 0x023205
__author__ = "Kenneth Reitz"
__author_email__ = "[email protected]"
__license__ = "Apache-2.0"
diff --git a/contrib/python/requests/py3/requests/adapters.py b/contrib/python/requests/py3/requests/adapters.py
index 9a8efc786cf..f41d5827cdd 100644
--- a/contrib/python/requests/py3/requests/adapters.py
+++ b/contrib/python/requests/py3/requests/adapters.py
@@ -27,7 +27,6 @@ from urllib3.poolmanager import PoolManager, proxy_from_url
from urllib3.util import Timeout as TimeoutSauce
from urllib3.util import parse_url
from urllib3.util.retry import Retry
-from urllib3.util.ssl_ import create_urllib3_context
from .auth import _basic_auth_str
from .compat import basestring, urlparse
@@ -74,20 +73,6 @@ DEFAULT_RETRIES = 0
DEFAULT_POOL_TIMEOUT = None
-try:
- import ssl # noqa: F401
- import urllib3.util.ssl_
- urllib3.util.ssl_.SSLContext = ssl.SSLContext
- _preloaded_ssl_context = create_urllib3_context()
- _preloaded_ssl_context.load_verify_locations(
- extract_zipped_paths(DEFAULT_CA_BUNDLE_PATH)
- )
-except ImportError:
- # Bypass default SSLContext creation when Python
- # interpreter isn't built with the ssl module.
- _preloaded_ssl_context = None
-
-
def _urllib3_request_context(
request: "PreparedRequest",
verify: "bool | str | None",
@@ -100,19 +85,9 @@ def _urllib3_request_context(
scheme = parsed_request_url.scheme.lower()
port = parsed_request_url.port
- # Determine if we have and should use our default SSLContext
- # to optimize performance on standard requests.
- poolmanager_kwargs = getattr(poolmanager, "connection_pool_kw", {})
- has_poolmanager_ssl_context = poolmanager_kwargs.get("ssl_context")
- should_use_default_ssl_context = (
- _preloaded_ssl_context is not None and not has_poolmanager_ssl_context
- )
-
cert_reqs = "CERT_REQUIRED"
if verify is False:
cert_reqs = "CERT_NONE"
- elif verify is True and should_use_default_ssl_context:
- pool_kwargs["ssl_context"] = _preloaded_ssl_context
elif isinstance(verify, str):
if not os.path.isdir(verify):
pool_kwargs["ca_certs"] = verify
@@ -315,26 +290,27 @@ class HTTPAdapter(BaseAdapter):
:param cert: The SSL certificate to verify.
"""
if url.lower().startswith("https") and verify:
- conn.cert_reqs = "CERT_REQUIRED"
+ cert_loc = None
- # Only load the CA certificates if 'verify' is a string indicating the CA bundle to use.
- # Otherwise, if verify is a boolean, we don't load anything since
- # the connection will be using a context with the default certificates already loaded,
- # and this avoids a call to the slow load_verify_locations()
+ # Allow self-specified cert location.
if verify is not True:
- # `verify` must be a str with a path then
cert_loc = verify
- if isinstance(cert_loc, str) and not os.path.exists(cert_loc):
- raise OSError(
- f"Could not find a suitable TLS CA certificate bundle, "
- f"invalid path: {cert_loc}"
- )
+ if not cert_loc:
+ cert_loc = extract_zipped_paths(DEFAULT_CA_BUNDLE_PATH)
- if not isinstance(cert_loc, str) or not os.path.isdir(cert_loc):
- conn.ca_certs = cert_loc
- else:
- conn.ca_cert_dir = cert_loc
+ if not cert_loc or (isinstance(cert_loc, str) and not os.path.exists(cert_loc)):
+ raise OSError(
+ f"Could not find a suitable TLS CA certificate bundle, "
+ f"invalid path: {cert_loc}"
+ )
+
+ conn.cert_reqs = "CERT_REQUIRED"
+
+ if not isinstance(cert_loc, str) or not os.path.isdir(cert_loc):
+ conn.ca_certs = cert_loc
+ else:
+ conn.ca_cert_dir = cert_loc
else:
conn.cert_reqs = "CERT_NONE"
conn.ca_certs = None
@@ -411,7 +387,7 @@ class HTTPAdapter(BaseAdapter):
``"cert_reqs"`` will be set
* If ``verify`` is a string, (i.e., it is a user-specified trust bundle)
``"ca_certs"`` will be set if the string is not a directory recognized
- by :py:func:`os.path.isdir`, otherwise ``"ca_certs_dir"`` will be
+ by :py:func:`os.path.isdir`, otherwise ``"ca_cert_dir"`` will be
set.
* If ``"cert"`` is specified, ``"cert_file"`` will always be set. If
``"cert"`` is a tuple with a second item, ``"key_file"`` will also
diff --git a/contrib/python/requests/py3/requests/sessions.py b/contrib/python/requests/py3/requests/sessions.py
index b387bc36df7..731550de88a 100644
--- a/contrib/python/requests/py3/requests/sessions.py
+++ b/contrib/python/requests/py3/requests/sessions.py
@@ -535,7 +535,7 @@ class Session(SessionRedirectMixin):
for multipart encoding upload.
:param auth: (optional) Auth tuple or callable to enable
Basic/Digest/Custom HTTP Auth.
- :param timeout: (optional) How long to wait for the server to send
+ :param timeout: (optional) How many seconds to wait for the server to send
data before giving up, as a float, or a :ref:`(connect timeout,
read timeout) <timeouts>` tuple.
:type timeout: float or tuple
diff --git a/contrib/python/requests/py3/ya.make b/contrib/python/requests/py3/ya.make
index bde0fcdf41d..1c5d19f6f7d 100644
--- a/contrib/python/requests/py3/ya.make
+++ b/contrib/python/requests/py3/ya.make
@@ -2,7 +2,7 @@
PY3_LIBRARY()
-VERSION(2.32.4)
+VERSION(2.32.5)
LICENSE(Apache-2.0)