File: python3.13.4

package info (click to toggle)
beautifulsoup4 4.13.4-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 2,548 kB
  • sloc: python: 10,280; makefile: 133; sh: 7
file content (43 lines) | stat: -rw-r--r-- 1,727 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
From: Stefano Rivera <stefano@rivera.za.net>
Date: Sat, 24 May 2025 17:41:31 +0200
Subject: ParserRejectedMarkup is no longer raised

CPython fixed https://github.com/python/cpython/issues/77057 and
backported this to >= 3.13.4

This recently show up in Debian unstable, when we uploaded the latest
3.13 snapshot.

Bug-Debian: https://bugs.debian.org/1106421
Forwarded: https://code.launchpad.net/~stefanor/beautifulsoup/+git/beautifulsoup/+merge/486069
---
 bs4/tests/test_fuzz.py       | 2 ++
 bs4/tests/test_htmlparser.py | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/bs4/tests/test_fuzz.py b/bs4/tests/test_fuzz.py
index f5b0990..e30b6fd 100644
--- a/bs4/tests/test_fuzz.py
+++ b/bs4/tests/test_fuzz.py
@@ -76,6 +76,8 @@ class TestFuzz(object):
             "crash-ffbdfa8a2b26f13537b68d3794b0478a4090ee4a",
         ],
     )
+    # Fixed in https://github.com/python/cpython/issues/77057
+    @pytest.mark.skipif("sys.version_info >= (3, 13)")
     def test_rejected_markup(self, filename):
         markup = self.__markup(filename)
         with pytest.raises(ParserRejectedMarkup):
diff --git a/bs4/tests/test_htmlparser.py b/bs4/tests/test_htmlparser.py
index b2bd07f..ffac1e5 100644
--- a/bs4/tests/test_htmlparser.py
+++ b/bs4/tests/test_htmlparser.py
@@ -16,6 +16,8 @@ from . import HTMLTreeBuilderSmokeTest
 class TestHTMLParserTreeBuilder(HTMLTreeBuilderSmokeTest):
     default_builder = HTMLParserTreeBuilder
 
+    # Fixed in https://github.com/python/cpython/issues/77057
+    @pytest.mark.skipif("sys.version_info >= (3, 13)")
     def test_rejected_input(self):
         # Python's html.parser will occasionally reject markup,
         # especially when there is a problem with the initial DOCTYPE