This change is for python3-django_2.2.28.

During backporting a patch for CVE-2024-56374, an import got into
the patch for v2.2.28 that does not exist yet in that version.

This patch handles this import with a fallback to prevent throwing
and ImportError.

Signed-off-by: Gyorgy Sarvari <[email protected]>
---
 .../python3-django/0001-fix-ipv6-test.patch   | 34 +++++++++++++++++++
 .../python/python3-django_2.2.28.bb           |  3 +-
 2 files changed, 36 insertions(+), 1 deletion(-)
 create mode 100644 
meta-python/recipes-devtools/python/python3-django/0001-fix-ipv6-test.patch

diff --git 
a/meta-python/recipes-devtools/python/python3-django/0001-fix-ipv6-test.patch 
b/meta-python/recipes-devtools/python/python3-django/0001-fix-ipv6-test.patch
new file mode 100644
index 0000000000..57f2a073cc
--- /dev/null
+++ 
b/meta-python/recipes-devtools/python/python3-django/0001-fix-ipv6-test.patch
@@ -0,0 +1,34 @@
+From b56516c12f05cf56e65cc960f865d5ebdae733e2 Mon Sep 17 00:00:00 2001
+From: Gyorgy Sarvari <[email protected]>
+Date: Wed, 14 Jan 2026 11:05:36 +0100
+Subject: [PATCH] fix ipv6 test
+
+During backporting a patch for CVE-2024-56374, an import got into
+the patch for v2.2.28 that does not exist yet in that version.
+
+This patch handles this import with a fallback to prevent throwing
+and ImportError.
+
+Upstream-Status: Inappropriate [Backport specific]
+Signed-off-by: Gyorgy Sarvari <[email protected]>
+---
+ tests/utils_tests/test_ipv6.py | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/tests/utils_tests/test_ipv6.py b/tests/utils_tests/test_ipv6.py
+index 1ac6763..3b21948 100644
+--- a/tests/utils_tests/test_ipv6.py
++++ b/tests/utils_tests/test_ipv6.py
+@@ -8,8 +8,10 @@ from django.utils.ipv6 import (
+     clean_ipv6_address,
+     is_valid_ipv6_address,
+ )
+-from django.utils.version import PY310
+-
++try:
++    from django.utils.version import PY310
++except ImportError:
++    PY310 = None
+ 
+ class TestUtilsIPv6(SimpleTestCase):
+ 
diff --git a/meta-python/recipes-devtools/python/python3-django_2.2.28.bb 
b/meta-python/recipes-devtools/python/python3-django_2.2.28.bb
index 3b5491cd5e..3dd64a5507 100644
--- a/meta-python/recipes-devtools/python/python3-django_2.2.28.bb
+++ b/meta-python/recipes-devtools/python/python3-django_2.2.28.bb
@@ -36,7 +36,8 @@ SRC_URI += "file://CVE-2023-31047.patch \
             file://Fix-missing-JSONField-in-django.db.mo.patch \
             file://0001-Fixed-35172-Fixed-intcomma-for-string-floats.patch \
             file://0001-implement-group-method-for-FakeMatch.patch \
-           "
+            file://0001-fix-ipv6-test.patch \
+            "
 
 SRC_URI[sha256sum] = 
"0200b657afbf1bc08003845ddda053c7641b9b24951e52acd51f6abda33a7413"
 
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#123494): 
https://lists.openembedded.org/g/openembedded-devel/message/123494
Mute This Topic: https://lists.openembedded.org/mt/117276145/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to