summaryrefslogtreecommitdiffstats
path: root/meta-python/recipes-devtools/python/python3-django/0001-fix-ipv6-test.patch
diff options
context:
space:
mode:
authorGyorgy Sarvari <skandigraun@gmail.com>2026-01-15 09:29:10 +0100
committerGyorgy Sarvari <skandigraun@gmail.com>2026-01-15 13:50:52 +0100
commit6d3dcbce79a30772ec9ce48fdfede258513c313a (patch)
tree354dcad5afc04814886748fec66c5d72dc36d6b5 /meta-python/recipes-devtools/python/python3-django/0001-fix-ipv6-test.patch
parent2e331249b2af8649ea0deaea552ba1d1d0a16476 (diff)
downloadmeta-openembedded-6d3dcbce79a30772ec9ce48fdfede258513c313a.tar.gz
python3-django: handle non-existing import from CVE patch
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 <skandigraun@gmail.com>
Diffstat (limited to 'meta-python/recipes-devtools/python/python3-django/0001-fix-ipv6-test.patch')
-rw-r--r--meta-python/recipes-devtools/python/python3-django/0001-fix-ipv6-test.patch34
1 files changed, 34 insertions, 0 deletions
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 @@
1From b56516c12f05cf56e65cc960f865d5ebdae733e2 Mon Sep 17 00:00:00 2001
2From: Gyorgy Sarvari <skandigraun@gmail.com>
3Date: Wed, 14 Jan 2026 11:05:36 +0100
4Subject: [PATCH] fix ipv6 test
5
6During backporting a patch for CVE-2024-56374, an import got into
7the patch for v2.2.28 that does not exist yet in that version.
8
9This patch handles this import with a fallback to prevent throwing
10and ImportError.
11
12Upstream-Status: Inappropriate [Backport specific]
13Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
14---
15 tests/utils_tests/test_ipv6.py | 6 ++++--
16 1 file changed, 4 insertions(+), 2 deletions(-)
17
18diff --git a/tests/utils_tests/test_ipv6.py b/tests/utils_tests/test_ipv6.py
19index 1ac6763..3b21948 100644
20--- a/tests/utils_tests/test_ipv6.py
21+++ b/tests/utils_tests/test_ipv6.py
22@@ -8,8 +8,10 @@ from django.utils.ipv6 import (
23 clean_ipv6_address,
24 is_valid_ipv6_address,
25 )
26-from django.utils.version import PY310
27-
28+try:
29+ from django.utils.version import PY310
30+except ImportError:
31+ PY310 = None
32
33 class TestUtilsIPv6(SimpleTestCase):
34