Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at r-updates 58 lines 2.6 kB view raw
1From e0a1e8d549e7be25960b8ad060c63def3dc35d1d Mon Sep 17 00:00:00 2001 2From: Natalia <124304+nessita@users.noreply.github.com> 3Date: Mon, 21 Jul 2025 15:23:32 -0300 4Subject: [PATCH 1/2] Fixed test_utils.tests.HTMLEqualTests.test_parsing_errors 5 following Python's HTMLParser fixed parsing. 6 7Further details about Python changes can be found in: 8https://github.com/python/cpython/commit/0243f97cbadec8d985e63b1daec5d1cbc850cae3. 9 10Thank you Clifford Gama for the thorough review! 11--- 12 tests/test_utils/tests.py | 2 +- 13 1 file changed, 1 insertion(+), 1 deletion(-) 14 15diff --git a/tests/test_utils/tests.py b/tests/test_utils/tests.py 16index 37e87aa1022c..9c22b61b4ff2 100644 17--- a/tests/test_utils/tests.py 18+++ b/tests/test_utils/tests.py 19@@ -962,7 +962,7 @@ def test_parsing_errors(self): 20 "('Unexpected end tag `div` (Line 1, Column 6)', (1, 6))" 21 ) 22 with self.assertRaisesMessage(AssertionError, error_msg): 23- self.assertHTMLEqual("< div></ div>", "<div></div>") 24+ self.assertHTMLEqual("< div></div>", "<div></div>") 25 with self.assertRaises(HTMLParseError): 26 parse_html("</p>") 27 28 29From e8afcf0e644553bcba3e5f931266963bffc46748 Mon Sep 17 00:00:00 2001 30From: Natalia <124304+nessita@users.noreply.github.com> 31Date: Mon, 14 Jul 2025 14:45:03 -0300 32Subject: [PATCH 2/2] Fixed #36499 -- Adjusted 33 utils_tests.test_html.TestUtilsHtml.test_strip_tags following Python's 34 HTMLParser new behavior. 35 36Python fixed a quadratic complexity processing for HTMLParser in: 37https://github.com/python/cpython/commit/6eb6c5dbfb528bd07d77b60fd71fd05d81d45c41. 38--- 39 tests/utils_tests/test_html.py | 4 ++-- 40 1 file changed, 2 insertions(+), 2 deletions(-) 41 42diff --git a/tests/utils_tests/test_html.py b/tests/utils_tests/test_html.py 43index 284f33aedcfb..51573b81eb9d 100644 44--- a/tests/utils_tests/test_html.py 45+++ b/tests/utils_tests/test_html.py 46@@ -142,10 +142,10 @@ def test_strip_tags(self): 47 ("&gotcha&#;<>", "&gotcha&#;<>"), 48 ("<sc<!-- -->ript>test<<!-- -->/script>", "ript>test"), 49 ("<script>alert()</script>&h", "alert()h"), 50- ("><!" + ("&" * 16000) + "D", "><!" + ("&" * 16000) + "D"), 51+ ("><!" + ("&" * 16000) + "D", ">"), 52 ("X<<<<br>br>br>br>X", "XX"), 53 ("<" * 50 + "a>" * 50, ""), 54- (">" + "<a" * 500 + "a", ">" + "<a" * 500 + "a"), 55+ (">" + "<a" * 500 + "a", ">"), 56 ("<a" * 49 + "a" * 951, "<a" * 49 + "a" * 951), 57 ("<" + "a" * 1_002, "<" + "a" * 1_002), 58 )