summaryrefslogtreecommitdiffstats
path: root/meta-python/recipes-devtools/python/python3-django-3.2.25
diff options
context:
space:
mode:
Diffstat (limited to 'meta-python/recipes-devtools/python/python3-django-3.2.25')
-rw-r--r--meta-python/recipes-devtools/python/python3-django-3.2.25/0001-Fix-tag_strip-tests.patch37
-rw-r--r--meta-python/recipes-devtools/python/python3-django-3.2.25/0001-Fixed-test_utils.tests.HTMLEqualTests.test_parsing_e.patch32
2 files changed, 69 insertions, 0 deletions
diff --git a/meta-python/recipes-devtools/python/python3-django-3.2.25/0001-Fix-tag_strip-tests.patch b/meta-python/recipes-devtools/python/python3-django-3.2.25/0001-Fix-tag_strip-tests.patch
new file mode 100644
index 0000000000..c99242e348
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-django-3.2.25/0001-Fix-tag_strip-tests.patch
@@ -0,0 +1,37 @@
1From bd3ffbbacceef7fabd3135ca90eba1397e2b5901 Mon Sep 17 00:00:00 2001
2From: Your Name <you@example.com>
3Date: Tue, 13 Jan 2026 20:07:35 +0000
4Subject: [PATCH] Fix tag_strip tests
5
6Python's htmlparser behavior changed between python versions, and
7the tests expect incorrect result due to this.
8
9This patch is a partial backport, to use only the results that are
10valid for the OE Python version.
11
12Upstream-Status: Backport [https://github.com/django/django/commit/2980627502c84a9fd09272e1349dc574a2ff1fb1]
13Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
14---
15 tests/utils_tests/test_html.py | 4 ++--
16 1 file changed, 2 insertions(+), 2 deletions(-)
17
18diff --git a/tests/utils_tests/test_html.py b/tests/utils_tests/test_html.py
19index 86f5562..71757ad 100644
20--- a/tests/utils_tests/test_html.py
21+++ b/tests/utils_tests/test_html.py
22@@ -91,10 +91,10 @@ class TestUtilsHtml(SimpleTestCase):
23 ('&gotcha&#;<>', '&gotcha&#;<>'),
24 ('<sc<!-- -->ript>test<<!-- -->/script>', 'ript>test'),
25 ('<script>alert()</script>&h', 'alert()h'),
26- ('><!' + ('&' * 16000) + 'D', '><!' + ('&' * 16000) + 'D'),
27+ ('><!' + ('&' * 16000) + 'D', '>'),
28 ('X<<<<br>br>br>br>X', 'XX'),
29 ("<" * 50 + "a>" * 50, ""),
30- (">" + "<a" * 500 + "a", ">" + "<a" * 500 + "a"),
31+ (">" + "<a" * 500 + "a", ">"),
32 ("<a" * 49 + "a" * 951, "<a" * 49 + "a" * 951),
33 ("<" + "a" * 1_002, "<" + "a" * 1_002),
34 )
35--
362.39.5
37
diff --git a/meta-python/recipes-devtools/python/python3-django-3.2.25/0001-Fixed-test_utils.tests.HTMLEqualTests.test_parsing_e.patch b/meta-python/recipes-devtools/python/python3-django-3.2.25/0001-Fixed-test_utils.tests.HTMLEqualTests.test_parsing_e.patch
new file mode 100644
index 0000000000..83975c8f75
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-django-3.2.25/0001-Fixed-test_utils.tests.HTMLEqualTests.test_parsing_e.patch
@@ -0,0 +1,32 @@
1From 744927154e6748db08f5232de78ee0d4a8be61a5 Mon Sep 17 00:00:00 2001
2From: Gyorgy Sarvari <skandigraun@gmail.com>
3Date: Mon, 21 Jul 2025 15:23:32 -0300
4Subject: [PATCH] Fixed test_utils.tests.HTMLEqualTests.test_parsing_errors
5 following Python's HTMLParser fixed parsing.
6
7From: Natalia <124304+nessita@users.noreply.github.com>
8
9Further details about Python changes can be found in:
10https://github.com/python/cpython/commit/0243f97cbadec8d985e63b1daec5d1cbc850cae3.
11
12Thank you Clifford Gama for the thorough review!
13
14Upstream-Status: Backport [https://github.com/django/django/commit/e4515dad7a6d953c0bd2414127ba36e1446ff41a]
15Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
16---
17 tests/test_utils/tests.py | 2 +-
18 1 file changed, 1 insertion(+), 1 deletion(-)
19
20diff --git a/tests/test_utils/tests.py b/tests/test_utils/tests.py
21index a1a113a..d1a1e35 100644
22--- a/tests/test_utils/tests.py
23+++ b/tests/test_utils/tests.py
24@@ -848,7 +848,7 @@ class HTMLEqualTests(SimpleTestCase):
25 "('Unexpected end tag `div` (Line 1, Column 6)', (1, 6))"
26 )
27 with self.assertRaisesMessage(AssertionError, error_msg):
28- self.assertHTMLEqual('< div></ div>', '<div></div>')
29+ self.assertHTMLEqual('< div></div>', '<div></div>')
30 with self.assertRaises(HTMLParseError):
31 parse_html('</p>')
32