From: Daniel McGregor <[email protected]>

OE Core includes chardet 6.0, while requests warns for any version
greater than or equal to 6.0. Not for any real reason, but because
it was a higher version than what was released when requests 2.32
was released.

Signed-off-by: Daniel McGregor <[email protected]>
Signed-off-by: Yoann Congal <[email protected]>
---
 ...01-Increase-chardet-upper-limit-to-8.patch | 25 +++++++++++++++++++
 .../python/python3-requests_2.32.5.bb         |  1 +
 2 files changed, 26 insertions(+)
 create mode 100644 
meta/recipes-devtools/python/python3-requests/0001-Increase-chardet-upper-limit-to-8.patch

diff --git 
a/meta/recipes-devtools/python/python3-requests/0001-Increase-chardet-upper-limit-to-8.patch
 
b/meta/recipes-devtools/python/python3-requests/0001-Increase-chardet-upper-limit-to-8.patch
new file mode 100644
index 00000000000..662049ef94d
--- /dev/null
+++ 
b/meta/recipes-devtools/python/python3-requests/0001-Increase-chardet-upper-limit-to-8.patch
@@ -0,0 +1,25 @@
+From c6a303bc6ea1d1d2ee5be86c4eed92cbb325c1fe Mon Sep 17 00:00:00 2001
+From: Dan Blanchard <[email protected]>
+Date: Mon, 2 Mar 2026 17:49:19 -0500
+Subject: [PATCH] Increase chardet upper limit to 8
+
+Co-Authored-By: Claude Opus 4.6 <[email protected]>
+Signed-off-by: Daniel McGregor <[email protected]>
+Upstream-Status: Backport 
[https://github.com/psf/requests/commit/b2a1d33f571518ca9a6148e7da787cc5827f897a]
+---
+ src/requests/__init__.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/requests/__init__.py b/src/requests/__init__.py
+index 051cda1..f22eb37 100644
+--- a/src/requests/__init__.py
++++ b/src/requests/__init__.py
+@@ -76,7 +76,7 @@ def check_compatibility(urllib3_version, chardet_version, 
charset_normalizer_ver
+         major, minor, patch = chardet_version.split(".")[:3]
+         major, minor, patch = int(major), int(minor), int(patch)
+         # chardet_version >= 3.0.2, < 6.0.0
+-        assert (3, 0, 2) <= (major, minor, patch) < (6, 0, 0)
++        assert (3, 0, 2) <= (major, minor, patch) < (8, 0, 0)
+     elif charset_normalizer_version:
+         major, minor, patch = charset_normalizer_version.split(".")[:3]
+         major, minor, patch = int(major), int(minor), int(patch)
diff --git a/meta/recipes-devtools/python/python3-requests_2.32.5.bb 
b/meta/recipes-devtools/python/python3-requests_2.32.5.bb
index 3477a5d83e9..4c58436cef4 100644
--- a/meta/recipes-devtools/python/python3-requests_2.32.5.bb
+++ b/meta/recipes-devtools/python/python3-requests_2.32.5.bb
@@ -8,6 +8,7 @@ inherit pypi python_setuptools_build_meta
 SRC_URI[sha256sum] = 
"dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf"
 
 SRC_URI += "file://CVE-2026-25645.patch"
+SRC_URI += "file://0001-Increase-chardet-upper-limit-to-8.patch"
 SRC_URI:append:class-nativesdk = " file://environment.d-python3-requests.sh"
 
 do_install:append:class-nativesdk() {
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#237401): 
https://lists.openembedded.org/g/openembedded-core/message/237401
Mute This Topic: https://lists.openembedded.org/mt/119404671/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to