• Bug#1106421: beautifulsoup4: FTBFS: E Failed: DID NOT RAISE

    From Santiago Vila@21:1/5 to All on Sat May 24 18:50:02 2025
    Package: src:beautifulsoup4
    Version: 4.13.4-1
    Severity: serious
    Tags: ftbfs trixie sid

    Dear maintainer:

    During a rebuild of all packages in unstable, your package failed to build:

    --------------------------------------------------------------------------------
    [...]
    debian/rules clean
    dh clean --buildsystem=pybuild
    debian/rules override_dh_auto_clean
    make[1]: Entering directory '/<<PKGBUILDDIR>>'
    dh_auto_clean
    rm -rf build
    make[1]: Leaving directory '/<<PKGBUILDDIR>>'
    dh_autoreconf_clean -O--buildsystem=pybuild
    dh_clean -O--buildsystem=pybuild
    debian/rules binary
    dh binary --buildsystem=pybuild
    dh_update_autotools_config -O--buildsystem=pybuild
    dh_autoreconf -O--buildsystem=pybuild
    dh_auto_configure -O--buildsystem=pybuild
    dh_auto_build -O--buildsystem=pybuild
    I: pybuild plugin_pyproject:129: Building wheel for python3.13 with "build" module
    I: pybuild base:311: python3.13 -m build --skip-dependency-check --no-isolation --wheel --outdir /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_bs4
    * Building wheel...
    Successfully built beautifulsoup4-4.13.4-py3-none-any.whl
    I: pybuild plugin_pyproject:144: Unpacking wheel built for python3.13 with "installer" module
    debian/rules execute_after_dh_auto_build
    make[1]: Entering directory '/<<PKGBUILDDIR>>'
    python3 -m sphinx -aEN -b html -d build/doctrees doc build/html
    Running Sphinx v8.1.3
    loading translations [en,ja,ko,ru,pt,zh]... not available for built-in messages making output directory... done
    loading intersphinx inventory 'python' from https://docs.python.org/3/objects.inv ...
    building [mo]: all of 0 po files
    writing output...
    building [html]: all source files
    updating environment: [new config] 1 added, 0 changed, 0 removed
    reading sources... [100%] index

    looking for now-outdated files... none found
    pickling environment... done
    checking consistency... done
    preparing documents... done
    copying assets...
    copying static files...
    Writing evaluated template result to /<<PKGBUILDDIR>>/build/html/_static/language_data.js
    Writing evaluated template result to /<<PKGBUILDDIR>>/build/html/_static/basic.css
    Writing evaluated template result to /<<PKGBUILDDIR>>/build/html/_static/documentation_options.js
    Writing evaluated template result to /<<PKGBUILDDIR>>/build/html/_static/alabaster.css
    copying static files: done
    copying extra files...
    copying extra files: done
    copying assets: done
    writing output... [100%] index

    /<<PKGBUILDDIR>>/doc/index.rst:55: WARNING: unknown document: 'api/modules' [ref.doc]
    generating indices... genindex done
    writing additional pages... search done
    copying images... [100%] 6.1.jpg

    dumping search index in English (code: en)... done
    dumping object inventory... done
    build succeeded, 1 warning.

    The HTML pages are in build/html.
    python3 -m sphinx -aEN -b html -D language=es_ES -d build/doctrees.es doc.es/source build/html.es
    Running Sphinx v8.1.3
    loading translations [es_ES]... done
    making output directory... done
    WARNING: html_static_path entry '_static' does not exist
    Converting `source_suffix = '.rst'` to `source_suffix = {'.rst': 'restructuredtext'}`.
    building [mo]: all of 0 po files
    writing output...
    building [html]: all source files
    updating environment: [new config] 1 added, 0 changed, 0 removed
    reading sources... [100%] index

    looking for now-outdated files... none found
    pickling environment... done
    checking consistency... done
    preparing documents... done
    copying assets...
    copying static files...
    Writing evaluated template result to /<<PKGBUILDDIR>>/build/html.es/_static/language_data.js
    Writing evaluated template result to /<<PKGBUILDDIR>>/build/html.es/_static/basic.css
    Writing evaluated template result to /<<PKGBUILDDIR>>/build/html.es/_static/documentation_options.js
    Writing evaluated template result to /<<PKGBUILDDIR>>/build/html.es/_static/sidebar.js
    Writing evaluated template result to /<<PKGBUILDDIR>>/build/html.es/_static/classic.css
    copying static files: done
    copying extra files...
    copying extra files: done
    copying assets: done
    writing output... [100%] index

    generating indices... genindex py-modindex done
    writing additional pages... search done
    copying images... [100%] 6.1.jpg

    dumping search index in Spanish (code: es)... done
    dumping object inventory... done
    build succeeded, 1 warning.

    The HTML pages are in build/html.es.
    python3 -m sphinx -aEN -b html -D language=pt_BR -d build/doctrees.ptbr doc.ptbr/source build/html.ptbr
    Running Sphinx v8.1.3
    loading translations [pt_BR]... done
    making output directory... done
    WARNING: html_static_path entry '_static' does not exist
    Converting `source_suffix = '.rst'` to `source_suffix = {'.rst': 'restructuredtext'}`.
    building [mo]: all of 0 po files
    writing output...
    building [html]: all source files
    updating environment: [new config] 1 added, 0 changed, 0 removed
    reading sources... [100%] index

    looking for now-outdated files... none found
    pickling environment... done
    checking consistency... done
    preparing documents... done
    copying assets...
    copying static files...
    Writing evaluated template result to /<<PKGBUILDDIR>>/build/html.ptbr/_static/language_data.js
    Writing evaluated template result to /<<PKGBUILDDIR>>/build/html.ptbr/_static/basic.css
    Writing evaluated template result to /<<PKGBUILDDIR>>/build/html.ptbr/_static/documentation_options.js
    Writing evaluated template result to /<<PKGBUILDDIR>>/build/html.ptbr/_static/sidebar.js
    Writing evaluated template result to /<<PKGBUILDDIR>>/build/html.ptbr/_static/classic.css
    copying static files: done
    copying extra files...
    copying extra files: done
    copying assets: done
    writing output... [100%] index

    generating indices... genindex done
    writing additional pages... search done
    copying images... [100%] 6.1.jpg

    dumping search index in Portuguese (code: pt)... done
    dumping object inventory... done
    build succeeded, 1 warning.

    The HTML pages are in build/html.ptbr.
    python3 -m sphinx -aEN -b html -D language=ru_RU -d build/doctrees.ru doc.ru/source build/html.ru
    Running Sphinx v8.1.3
    loading translations [ru_RU]... done
    making output directory... done
    WARNING: html_static_path entry '_static' does not exist
    Converting `source_suffix = '.rst'` to `source_suffix = {'.rst': 'restructuredtext'}`.
    building [mo]: all of 0 po files
    writing output...
    building [html]: all source files
    updating environment: [new config] 2 added, 0 changed, 0 removed
    reading sources... [ 50%] bs4ru
    reading sources... [100%] index

    looking for now-outdated files... none found
    pickling environment... done
    checking consistency... done
    preparing documents... done
    copying assets...
    copying static files...
    Writing evaluated template result to /<<PKGBUILDDIR>>/build/html.ru/_static/language_data.js
    Writing evaluated template result to /<<PKGBUILDDIR>>/build/html.ru/_static/basic.css
    Writing evaluated template result to /<<PKGBUILDDIR>>/build/html.ru/_static/documentation_options.js
    Writing evaluated template result to /<<PKGBUILDDIR>>/build/html.ru/_static/sidebar.js
    Writing evaluated template result to /<<PKGBUILDDIR>>/build/html.ru/_static/classic.css
    copying static files: done
    copying extra files...
    copying extra files: done
    copying assets: done
    writing output... [ 50%] bs4ru
    writing output... [100%] index

    generating indices... genindex done
    writing additional pages... search done
    copying images... [100%] 6.1.jpg

    dumping search index in Russian (code: ru)... done
    dumping object inventory... done
    build succeeded, 1 warning.

    The HTML pages are in build/html.ru.
    python3 -m sphinx -aEN -b html -D language=zh_CN -d build/doctrees.zh doc.zh/source build/html.zh
    Running Sphinx v8.1.3
    loading translations [zh_CN]... done
    making output directory... done
    WARNING: html_static_path entry '_static' does not exist
    Converting `source_suffix = '.rst'` to `source_suffix = {'.rst': 'restructuredtext'}`.
    building [mo]: all of 0 po files
    writing output...
    building [html]: all source files
    updating environment: [new config] 1 added, 0 changed, 0 removed
    reading sources... [100%] index

    looking for now-outdated files... none found
    pickling environment... done
    checking consistency... done
    preparing documents... done
    copying assets...
    copying static files...
    Writing evaluated template result to /<<PKGBUILDDIR>>/build/html.zh/_static/language_data.js
    Writing evaluated template result to /<<PKGBUILDDIR>>/build/html.zh/_static/basic.css
    Writing evaluated template result to /<<PKGBUILDDIR>>/build/html.zh/_static/documentation_options.js
    Writing evaluated template result to /<<PKGBUILDDIR>>/build/html.zh/_static/sidebar.js
    Writing evaluated template result to /<<PKGBUILDDIR>>/build/html.zh/_static/classic.css
    copying static files: done
    copying extra files...
    copying extra files: done
    copying assets: done
    writing output... [100%] index

    generating indices... genindex py-modindex done
    writing additional pages... search done
    dumping search index in Chinese (code: zh)... done
    dumping object inventory... done
    build succeeded, 1 warning.

    The HTML pages are in build/html.zh.
    make[1]: Leaving directory '/<<PKGBUILDDIR>>'
    dh_auto_test -O--buildsystem=pybuild
    I: pybuild base:311: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_bs4/build; python3.13 -m pytest
    ============================= test session starts ==============================
    platform linux -- Python 3.13.3, pytest-8.3.5, pluggy-1.5.0
    rootdir: /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_bs4/build
    configfile: pyproject.toml
    collected 851 items

    bs4/tests/test_builder.py ..... [ 0%] bs4/tests/test_builder_registry.py ........... [ 1%] bs4/tests/test_css.py .................................................. [ 7%] .......... [ 8%] bs4/tests/test_dammit.py ............................................... [ 14%]
    [ 14%] bs4/tests/test_element.py ......... [ 15%] bs4/tests/test_filter.py ............................................... [ 21%] ............................ [ 24%] bs4/tests/test_formatter.py ............................ [ 27%] bs4/tests/test_fuzz.py FF.........sssssss [ 29%] bs4/tests/test_html5lib.py ............................................. [ 35%] ............................................. [ 40%] bs4/tests/test_htmlparser.py ........................................... [ 45%] ...........................F......... [ 49%] bs4/tests/test_lxml.py ................................................. [ 55%] ............................................................ [ 62%] bs4/tests/test_navigablestring.py ......... [ 63%] bs4/tests/test_pageelement.py ...................................... [ 68%] bs4/tests/test_soup.py ................................................. [ 73%] .................................. [ 77%] bs4/tests/test_tag.py ........................ [ 80%] bs4/tests/test_tree.py ................................................. [ 86%] ........................................................................ [ 94%] ............................................ [100%]

    =================================== FAILURES ===================================
    _ TestFuzz.test_rejected_markup[clusterfuzz-testcase-minimized-bs4_fuzzer-5703933063462912] _

    self = <bs4.tests.test_fuzz.TestFuzz object at 0x7f0bedc87110>
    filename = 'clusterfuzz-testcase-minimized-bs4_fuzzer-5703933063462912'

    @pytest.mark.parametrize(
    "filename",
    [
    "clusterfuzz-testcase-minimized-bs4_fuzzer-5703933063462912",
    "crash-ffbdfa8a2b26f13537b68d3794b0478a4090ee4a",
    ],
    )
    def test_rejected_markup(self, filename):
    markup = self.__markup(filename)
    with pytest.raises(ParserRejectedMarkup):
    E Failed: DID NOT RAISE <class 'bs4.exceptions.ParserRejectedMarkup'>

    bs4/tests/test_fuzz.py:81: Failed
    _ TestFuzz.test_rejected_markup[crash-ffbdfa8a2b26f13537b68d3794b0478a4090ee4a] _

    self = <bs4.tests.test_fuzz.TestFuzz object at 0x7f0bedc86fd0>
    filename = 'crash-ffbdfa8a2b26f13537b68d3794b0478a4090ee4a'

    @pytest.mark.parametrize(
    "filename",
    [
    "clusterfuzz-testcase-minimized-bs4_fuzzer-5703933063462912",
    "crash-ffbdfa8a2b26f13537b68d3794b0478a4090ee4a",
    ],
    )
    def test_rejected_markup(self, filename):
    markup = self.__markup(filename)
    with pytest.raises(ParserRejectedMarkup):
    E Failed: DID NOT RAISE <class 'bs4.exceptions.ParserRejectedMarkup'>

    bs4/tests/test_fuzz.py:81: Failed
    ------------------------------ Captured log call -------------------------------
    WARNING bs4.dammit:dammit.py:825 Some characters could not be decoded, and were replaced with REPLACEMENT CHARACTER.
    ________________ TestHTMLParserTreeBuilder.test_rejected_input _________________

    self = <bs4.tests.test_htmlparser.TestHTMLParserTreeBuilder object at 0x7f0bedc874d0>

    def test_rejected_input(self):
    # Python's html.parser will occasionally reject markup,
    # especially when there is a problem with the initial DOCTYPE
    # declaration. Different versions of Python sound the alarm in
    # different ways, but Beautiful Soup consistently raises
    # errors as ParserRejectedMarkup exceptions.
    bad_markup = [
    # https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=28873
    # https://github.com/guidovranken/python-library-fuzzers/blob/master/corp-html/519e5b4269a01185a0d5e76295251921da2f0700
    # https://github.com/python/cpython/issues/81928
    b"\n<![\xff\xfe\xfe\xcd\x00",
    # https://github.com/guidovranken/python-library-fuzzers/blob/master/corp-html/de32aa55785be29bbc72a1a8e06b00611fb3d9f8
    # https://github.com/python/cpython/issues/78661
    #
    b"<![n\x00",
    b"<![UNKNOWN[]]>",
    ]
    for markup in bad_markup:
    with pytest.raises(ParserRejectedMarkup):
    E Failed: DID NOT RAISE <class 'bs4.exceptions.ParserRejectedMarkup'>

    bs4/tests/test_htmlparser.py:37: Failed
    =========================== short test summary info ============================
    FAILED bs4/tests/test_fuzz.py::TestFuzz::test_rejected_markup[clusterfuzz-testcase-minimized-bs4_fuzzer-5703933063462912]
    FAILED bs4/tests/test_fuzz.py::TestFuzz::test_rejected_markup[crash-ffbdfa8a2b26f13537b68d3794b0478a4090ee4a]
    FAILED bs4/tests/test_htmlparser.py::TestHTMLParserTreeBuilder::test_rejected_input
    =================== 3 failed, 841 passed, 7 skipped in 1.65s ===================
    E: pybuild pybuild:389: test: plugin pyproject failed with: exit code=1: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_bs4/build; python3.13 -m pytest
    dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p 3.13 returned exit code 13
    make: *** [debian/rules:6: binary] Error 25
    dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2 --------------------------------------------------------------------------------

    The above is just how the build ends and not necessarily the most relevant part.
    If required, the full build log is available here:

    https://people.debian.org/~sanvila/build-logs/202505/

    About the archive rebuild: The build was made on virtual machines from AWS, using sbuild and a reduced chroot with only build-essential packages.

    If you could not reproduce the bug please contact me privately, as I
    am willing to provide ssh access to a virtual machine where the bug is
    fully reproducible.

    If this is really a bug in one of the build-depends, please use
    reassign and add an affects on src:beautifulsoup4, so that this is still visible in the BTS web page for this package.

    Thanks.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Stefano Rivera@21:1/5 to All on Mon May 26 18:00:02 2025
    Control: tag -1 pending

    Hello,

    Bug #1106421 in beautifulsoup4 reported by you has been fixed in the
    Git repository and is awaiting an upload. You can see the commit
    message below and you can check the diff of the fix at:

    https://salsa.debian.org/python-team/packages/beautifulsoup4/-/commit/f00db5b9190337afcfe5651539d7fb854dfd6333

    ------------------------------------------------------------------------
    Patch: Don't expect ParserRejectedMarkup to be raised any more. (Closes: #1106421)
    ------------------------------------------------------------------------

    (this message was generated automatically)
    --
    Greetings

    https://bugs.debian.org/1106421

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Debian Bug Tracking System@21:1/5 to All on Mon May 26 18:00:01 2025
    Processing control commands:

    tag -1 pending
    Bug #1106421 [src:beautifulsoup4] beautifulsoup4: FTBFS: E Failed: DID NOT RAISE <class 'bs4.exceptions.ParserRejectedMarkup'>
    Added tag(s) pending.

    --
    1106421: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1106421
    Debian Bug Tracking System
    Contact owner@bugs.debian.org with problems

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Debian Bug Tracking System@21:1/5 to All on Mon May 26 18:10:01 2025
    This is a multi-part message in MIME format...

    Your message dated Mon, 26 May 2025 16:04:13 +0000
    with message-id <E1uJaJB-009e32-9H@fasolo.debian.org>
    and subject line Bug#1106421: fixed in beautifulsoup4 4.13.4-2
    has caused the Debian Bug report #1106421,
    regarding beautifulsoup4: FTBFS: E Failed: DID NOT RAISE <class 'bs4.exceptions.ParserRejectedMarkup'>
    to be marked as done.

    This means that you claim that the problem has been dealt with.
    If this is not the case it is now your responsibility to reopen the
    Bug report if necessary, and/or fix the problem forthwith.

    (NB: If you are a system administrator and have no idea what this
    message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact owner@bugs.debian.org
    immediately.)


    --
    1106421: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1106421
    Debian Bug Tracking System
    Contact owner@bugs.debian.org with problems

    Received: (at submit) by bugs.debian.org; 24 May 2025 16:39:42 +0000 X-Spam-Checker-Version: SpamAssassin 3.4.6-bugs.debian.org_2005_01_02
    (2021-04-09) on buxtehude.debian.org
    X-Spam-Level:
    X-Spam-Status: No, score=-121.4 required=4.0 tests=ALL_TRUSTED,BAYES_00,
    BODY_INCLUDES_PACKAGE,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,
    DKIM_VALID_AU,DKIM_VALID_EF,FOURLA,FROMDEVELOPER,HAS_PACKAGE,
    MD5_SHA1_SUM,USER_IN_DKIM_WELCOMELIST,USER_IN_DKIM_WHITELIST,
    WEIRD_PORT,WORD_WITHOUT_VOWELS,X_DEBBUGS_CC autolearn=ham
    autolearn_force=no version=3.4.6-bugs.debian.org_2005_01_02 X-Spam-Bayes: score:0.0000 Tokens: new, 71; hammy, 150; neutral, 434; spammy,
    0. spammytokens: hammytokens:0.000-+--python3, 0.000-+--trixie,
    0.000-+--pkgbuilddir, 0.000-+--PKGBUILDDIR, 0.000-+--sk:dh_auto Return-path: <sanvila@debian.org>
    Received: from muffat.debian.org ([2607:f8f0:614