Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-Django for openSUSE:Factory checked in at 2025-12-29 15:15:47 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-Django (Old) and /work/SRC/openSUSE:Factory/.python-Django.new.1928 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-Django" Mon Dec 29 15:15:47 2025 rev:142 rq:1324665 version:5.2.9 Changes: -------- --- /work/SRC/openSUSE:Factory/python-Django/python-Django.changes 2025-12-09 12:51:57.315986003 +0100 +++ /work/SRC/openSUSE:Factory/.python-Django.new.1928/python-Django.changes 2025-12-29 15:16:01.041071804 +0100 @@ -1,0 +2,7 @@ +Mon Dec 29 09:10:21 UTC 2025 - Markéta Machová <[email protected]> + +- Add test_strip_tags_incomplete.patch to fix behaviour with changes + in the Python interpreter +- Rebase test_strip_tags.patch + +------------------------------------------------------------------- New: ---- test_strip_tags_incomplete.patch ----------(New B)---------- New: - Add test_strip_tags_incomplete.patch to fix behaviour with changes in the Python interpreter ----------(New E)---------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-Django.spec ++++++ --- /var/tmp/diff_new_pack.1nntkG/_old 2025-12-29 15:16:01.773101872 +0100 +++ /var/tmp/diff_new_pack.1nntkG/_new 2025-12-29 15:16:01.777102036 +0100 @@ -35,11 +35,13 @@ Source1: https://www.djangoproject.com/m/pgp/Django-%{version}.checksum.txt Source2: %{name}.keyring Source99: python-Django-rpmlintrc -# PATCH-FIX-UPSTREAM https://github.com/django/django/pull/19639 Fixed #36499 -- Adjusted utils_tests.test_html.TestUtilsHtml.test_strip_tags following Python's HTMLParser new behavior. -# fixed and refined upstream, but some of our interpreters weren't updated to a new version yet and still only carry the patch, so providing the non-conditional version -Patch0: test_strip_tags.patch # PATCH-FIX-UPSTREAM https://github.com/django/django/pull/19530 Fixed #36421 -- Made test_msgfmt_error_including_non_ascii compatible with with msgfmt 0.25. Patch1: support-msgfmt-0.25.patch +# PATCH-FIX-UPSTREAM https://github.com/django/django/pull/20390 Refs #36499 -- Adjusted test_strip_tags following Python behavior change for incomplete entities. +Patch2: test_strip_tags_incomplete.patch +# PATCH-FIX-UPSTREAM https://github.com/django/django/pull/19639 Fixed #36499 -- Adjusted utils_tests.test_html.TestUtilsHtml.test_strip_tags following Python's HTMLParser new behavior. +# fixed and refined upstream, but some of our interpreters weren't updated to a new version yet and still only carry the patch, so providing the non-conditional version +Patch3: test_strip_tags.patch BuildRequires: %{python_module Jinja2 >= 2.9.2} BuildRequires: %{python_module Pillow >= 6.2.0} BuildRequires: %{python_module PyYAML} ++++++ test_strip_tags.patch ++++++ --- /var/tmp/diff_new_pack.1nntkG/_old 2025-12-29 15:16:01.865105651 +0100 +++ /var/tmp/diff_new_pack.1nntkG/_new 2025-12-29 15:16:01.869105815 +0100 @@ -10,10 +10,10 @@ tests/utils_tests/test_html.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) -Index: django-5.2.6/tests/test_utils/tests.py +Index: django-5.2.9/tests/test_utils/tests.py =================================================================== ---- django-5.2.6.orig/tests/test_utils/tests.py -+++ django-5.2.6/tests/test_utils/tests.py +--- django-5.2.9.orig/tests/test_utils/tests.py ++++ django-5.2.9/tests/test_utils/tests.py @@ -945,10 +945,10 @@ class HTMLEqualTests(SimpleTestCase): self.assertHTMLEqual("", "<p>") error_msg = ( @@ -27,22 +27,22 @@ with self.assertRaises(HTMLParseError): parse_html("</p>") -Index: django-5.2.6/tests/utils_tests/test_html.py +Index: django-5.2.9/tests/utils_tests/test_html.py =================================================================== ---- django-5.2.6.orig/tests/utils_tests/test_html.py -+++ django-5.2.6/tests/utils_tests/test_html.py -@@ -162,13 +162,13 @@ class TestUtilsHtml(SimpleTestCase): - ("<script>alert()</script>&h", "alert()h"), +--- django-5.2.9.orig/tests/utils_tests/test_html.py ++++ django-5.2.9/tests/utils_tests/test_html.py +@@ -187,13 +187,13 @@ class TestUtilsHtml(SimpleTestCase): + ), ( "><!" + ("&" * 16000) + "D", -- ">" if htmlparser_fixed else "><!" + ("&" * 16000) + "D", +- ">" if htmlparser_fixed_security else "><!" + ("&" * 16000) + "D", + ">", ), ("X<<<<br>br>br>br>X", "XX"), ("<" * 50 + "a>" * 50, ""), ( ">" + "<a" * 500 + "a", -- ">" if htmlparser_fixed else ">" + "<a" * 500 + "a", +- ">" if htmlparser_fixed_security else ">" + "<a" * 500 + "a", + ">", ), ("<a" * 49 + "a" * 951, "<a" * 49 + "a" * 951), ++++++ test_strip_tags_incomplete.patch ++++++ >From 5ca0f62213911a77dd4a62e843db7e420cc98b78 Mon Sep 17 00:00:00 2001 From: Jacob Walls <[email protected]> Date: Thu, 11 Dec 2025 08:44:19 -0500 Subject: [PATCH] [5.2.x] Refs #36499 -- Adjusted test_strip_tags following Python behavior change for incomplete entities. Backport of 7b80b2186300620931009fd62c2969f108fe7a62 from main. --- tests/utils_tests/test_html.py | 35 +++++++++++++++++++++++++++++----- 1 file changed, 30 insertions(+), 5 deletions(-) diff --git a/tests/utils_tests/test_html.py b/tests/utils_tests/test_html.py index 681071bf0313..89c97cee03a5 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 @@ def test_strip_tags(self): # 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,28 @@ def test_strip_tags(self): (3, 10): (3, 10, 19), (3, 9): (3, 9, 24), } - htmlparser_fixed = sys.version_info >= min_fixed[sys.version_info[:2]] + htmlparser_fixed_security = ( + sys.version_info >= min_fixed_security[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), + # Not fixed in the following versions. + (3, 12): (3, 12, math.inf), + (3, 11): (3, 11, math.inf), + (3, 10): (3, 10, math.inf), + (3, 9): (3, 9, math.inf), + } + 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 = ( ( "<p>See: 'é is an apostrophe followed by e acute</p>", @@ -159,16 +181,19 @@ def test_strip_tags(self): # https://bugs.python.org/issue20288 ("&gotcha&#;<>", "&gotcha&#;<>"), ("<sc<!-- -->ript>test<<!-- -->/script>", "ript>test"), - ("<script>alert()</script>&h", "alert()h"), + ( + "<script>alert()</script>&h", + "alert()&h;" if htmlparser_fixed_incomplete_entities else "alert()h", + ), ( "><!" + ("&" * 16000) + "D", - ">" if htmlparser_fixed else "><!" + ("&" * 16000) + "D", + ">" if htmlparser_fixed_security else "><!" + ("&" * 16000) + "D", ), ("X<<<<br>br>br>br>X", "XX"), ("<" * 50 + "a>" * 50, ""), ( ">" + "<a" * 500 + "a", - ">" if htmlparser_fixed else ">" + "<a" * 500 + "a", + ">" if htmlparser_fixed_security else ">" + "<a" * 500 + "a", ), ("<a" * 49 + "a" * 951, "<a" * 49 + "a" * 951), ("<" + "a" * 1_002, "<" + "a" * 1_002),
