diff --git a/meta-python/recipes-devtools/python/python3-django/0001-Fix-test_strip_tags-test.patch b/meta-python/recipes-devtools/python/python3-django/0001-Fix-test_strip_tags-test.patch deleted file mode 100644 index f77c3b963a..0000000000 --- a/meta-python/recipes-devtools/python/python3-django/0001-Fix-test_strip_tags-test.patch +++ /dev/null @@ -1,76 +0,0 @@ -From 7b80b2186300620931009fd62c2969f108fe7a62 Mon Sep 17 00:00:00 2001 -From: Jacob Walls -Date: Thu, 11 Dec 2025 08:44:19 -0500 -Subject: [PATCH] Refs #36499 -- Adjusted test_strip_tags following Python - behavior change for incomplete entities. - -Upstream-Status: Backport [https://github.com/django/django/commit/7b80b2186300620931009fd62c2969f108fe7a62] -Signed-off-by: Gyorgy Sarvari ---- - tests/utils_tests/test_html.py | 25 ++++++++++++++++++++----- - 1 file changed, 20 insertions(+), 5 deletions(-) - -diff --git a/tests/utils_tests/test_html.py b/tests/utils_tests/test_html.py -index 7412c2624c73..ee115aaf1cf2 100644 ---- a/tests/utils_tests/test_html.py -+++ b/tests/utils_tests/test_html.py -@@ -1,3 +1,4 @@ -+import math - import os - import sys - from datetime import datetime -@@ -124,7 +125,7 @@ - # old and new results. The check below is temporary until all supported - # Python versions and CI workers include the fix. See: - # https://github.com/python/cpython/commit/6eb6c5db -- min_fixed = { -+ min_fixed_security = { - (3, 14): (3, 14), - (3, 13): (3, 13, 6), - (3, 12): (3, 12, 12), -@@ -132,7 +133,21 @@ - (3, 10): (3, 10, 19), - (3, 9): (3, 9, 24), - } -- htmlparser_fixed = sys.version_info >= min_fixed[sys.version_info[:2]] -+ # Similarly, there was a fix for terminating incomplete entities. See: -+ # https://github.com/python/cpython/commit/95296a9d -+ min_fixed_incomplete_entities = { -+ (3, 14): (3, 14, 1), -+ (3, 13): (3, 13, 10), -+ (3, 12): (3, 12, math.inf), # not fixed in 3.12. -+ } -+ major_version = sys.version_info[:2] -+ htmlparser_fixed_security = sys.version_info >= min_fixed_security.get( -+ major_version, major_version -+ ) -+ htmlparser_fixed_incomplete_entities = ( -+ sys.version_info -+ >= min_fixed_incomplete_entities.get(major_version, major_version) -+ ) - items = ( - ( - "

See: 'é is an apostrophe followed by e acute

", -@@ -159,16 +174,19 @@ - # https://bugs.python.org/issue20288 - ("&gotcha&#;<>", "&gotcha&#;<>"), - ("ript>test</script>", "ript>test"), -- ("&h", "alert()h"), -+ ( -+ "&h", -+ "alert()&h;" if htmlparser_fixed_incomplete_entities else "alert()h", -+ ), - ( - ">" if htmlparser_fixed else ">" if htmlparser_fixed_security else ">br>br>br>X", "XX"), - ("<" * 50 + "a>" * 50, ""), - ( - ">" + "" if htmlparser_fixed else ">" + "" if htmlparser_fixed_security else ">" + "