summaryrefslogtreecommitdiffstats
path: root/contrib/python
diff options
context:
space:
mode:
authorrobot-piglet <[email protected]>2025-06-27 15:18:25 +0300
committerrobot-piglet <[email protected]>2025-06-27 15:29:20 +0300
commiteb899d349e304f6f2d8abca99824bd084cdd1775 (patch)
treefe6ea511e5fe3aaead51993834e5774f46f98486 /contrib/python
parentbcc1a60a7fbad01d708e3fe180809d6be6d385ad (diff)
Intermediate changes
commit_hash:00183992a3c034e82e44c2bb45e1d1c1f6f3ff9d
Diffstat (limited to 'contrib/python')
-rw-r--r--contrib/python/requests/py3/.dist-info/METADATA32
-rw-r--r--contrib/python/requests/py3/requests/__version__.py4
-rw-r--r--contrib/python/requests/py3/requests/compat.py12
-rw-r--r--contrib/python/requests/py3/requests/models.py4
-rw-r--r--contrib/python/requests/py3/requests/utils.py22
-rw-r--r--contrib/python/requests/py3/ya.make2
6 files changed, 47 insertions, 29 deletions
diff --git a/contrib/python/requests/py3/.dist-info/METADATA b/contrib/python/requests/py3/.dist-info/METADATA
index 72d9dc53138..837ff4da270 100644
--- a/contrib/python/requests/py3/.dist-info/METADATA
+++ b/contrib/python/requests/py3/.dist-info/METADATA
@@ -1,6 +1,6 @@
-Metadata-Version: 2.1
+Metadata-Version: 2.4
Name: requests
-Version: 2.32.3
+Version: 2.32.4
Summary: Python HTTP for Humans.
Home-page: https://requests.readthedocs.io
Author: Kenneth Reitz
@@ -21,6 +21,7 @@ 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 :: Only
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
@@ -29,15 +30,28 @@ Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
-Requires-Dist: charset-normalizer <4,>=2
-Requires-Dist: idna <4,>=2.5
-Requires-Dist: urllib3 <3,>=1.21.1
-Requires-Dist: certifi >=2017.4.17
+Requires-Dist: charset_normalizer<4,>=2
+Requires-Dist: idna<4,>=2.5
+Requires-Dist: urllib3<3,>=1.21.1
+Requires-Dist: certifi>=2017.4.17
Provides-Extra: security
Provides-Extra: socks
-Requires-Dist: PySocks !=1.5.7,>=1.5.6 ; extra == 'socks'
-Provides-Extra: use_chardet_on_py3
-Requires-Dist: chardet <6,>=3.0.2 ; extra == 'use_chardet_on_py3'
+Requires-Dist: PySocks!=1.5.7,>=1.5.6; extra == "socks"
+Provides-Extra: use-chardet-on-py3
+Requires-Dist: chardet<6,>=3.0.2; extra == "use-chardet-on-py3"
+Dynamic: author
+Dynamic: author-email
+Dynamic: classifier
+Dynamic: description
+Dynamic: description-content-type
+Dynamic: home-page
+Dynamic: license
+Dynamic: license-file
+Dynamic: project-url
+Dynamic: provides-extra
+Dynamic: requires-dist
+Dynamic: requires-python
+Dynamic: summary
# Requests
diff --git a/contrib/python/requests/py3/requests/__version__.py b/contrib/python/requests/py3/requests/__version__.py
index 2c105aca7d4..3128a4644ec 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.3"
-__build__ = 0x023203
+__version__ = "2.32.4"
+__build__ = 0x023204
__author__ = "Kenneth Reitz"
__author_email__ = "[email protected]"
__license__ = "Apache-2.0"
diff --git a/contrib/python/requests/py3/requests/compat.py b/contrib/python/requests/py3/requests/compat.py
index 095de1b6cae..7f9d754350c 100644
--- a/contrib/python/requests/py3/requests/compat.py
+++ b/contrib/python/requests/py3/requests/compat.py
@@ -10,6 +10,18 @@ compatibility until the next major version.
import importlib
import sys
+# -------
+# urllib3
+# -------
+from urllib3 import __version__ as urllib3_version
+
+# Detect which major version of urllib3 is being used.
+try:
+ is_urllib3_1 = int(urllib3_version.split(".")[0]) == 1
+except (TypeError, AttributeError):
+ # If we can't discern a version, prefer old functionality.
+ is_urllib3_1 = True
+
# -------------------
# Character Detection
# -------------------
diff --git a/contrib/python/requests/py3/requests/models.py b/contrib/python/requests/py3/requests/models.py
index 8f56ca7d23a..c4b25fa0790 100644
--- a/contrib/python/requests/py3/requests/models.py
+++ b/contrib/python/requests/py3/requests/models.py
@@ -945,7 +945,9 @@ class Response:
return content
def json(self, **kwargs):
- r"""Returns the json-encoded content of a response, if any.
+ r"""Decodes the JSON response body (if any) as a Python object.
+
+ This may return a dictionary, list, etc. depending on what is in the response.
:param \*\*kwargs: Optional arguments that ``json.loads`` takes.
:raises requests.exceptions.JSONDecodeError: If the response body does not
diff --git a/contrib/python/requests/py3/requests/utils.py b/contrib/python/requests/py3/requests/utils.py
index 993efce108a..dce467019cf 100644
--- a/contrib/python/requests/py3/requests/utils.py
+++ b/contrib/python/requests/py3/requests/utils.py
@@ -38,6 +38,7 @@ from .compat import (
getproxies,
getproxies_environment,
integer_types,
+ is_urllib3_1,
)
from .compat import parse_http_list as _parse_list_header
from .compat import (
@@ -136,7 +137,9 @@ def super_len(o):
total_length = None
current_position = 0
- if isinstance(o, str):
+ if not is_urllib3_1 and isinstance(o, str):
+ # urllib3 2.x+ treats all strings as utf-8 instead
+ # of latin-1 (iso-8859-1) like http.client.
o = o.encode("utf-8")
if hasattr(o, "__len__"):
@@ -216,14 +219,7 @@ def get_netrc_auth(url, raise_errors=False):
netrc_path = None
for f in netrc_locations:
- try:
- loc = os.path.expanduser(f)
- except KeyError:
- # os.path.expanduser can fail when $HOME is undefined and
- # getpwuid fails. See https://bugs.python.org/issue20164 &
- # https://github.com/psf/requests/issues/1846
- return
-
+ loc = os.path.expanduser(f)
if os.path.exists(loc):
netrc_path = loc
break
@@ -233,13 +229,7 @@ def get_netrc_auth(url, raise_errors=False):
return
ri = urlparse(url)
-
- # Strip port numbers from netloc. This weird `if...encode`` dance is
- # used for Python 3.2, which doesn't support unicode literals.
- splitstr = b":"
- if isinstance(url, str):
- splitstr = splitstr.decode("ascii")
- host = ri.netloc.split(splitstr)[0]
+ host = ri.hostname
try:
_netrc = netrc(netrc_path).authenticators(host)
diff --git a/contrib/python/requests/py3/ya.make b/contrib/python/requests/py3/ya.make
index 81ad2efcc41..bde0fcdf41d 100644
--- a/contrib/python/requests/py3/ya.make
+++ b/contrib/python/requests/py3/ya.make
@@ -2,7 +2,7 @@
PY3_LIBRARY()
-VERSION(2.32.3)
+VERSION(2.32.4)
LICENSE(Apache-2.0)