Public bug reported:

soupsieve FTBFS due to test suite failures [1].

As per upstream's bug report [2], we arrive at [3] to understand the
root cause is due to lxml being built against libxml2 >= 2.9.11, where
CDATA is no longer stripped, causing parsing inconsistencies in
BeautifulSoup.

[4] has been reported for lxml and, once it is fixed, rebuilding this
package should be enough to close this bug. In the meanwhile, skipping
the tests based on the libxml2 version as suggested in [2] should be
safe.

[1] 
https://launchpad.net/ubuntu/+archive/test-rebuild-20210927-impish/+build/22213221
[2] https://github.com/facelessuser/soupsieve/issues/220
[3] https://bugs.launchpad.net/beautifulsoup/+bug/1930164
[4] https://bugs.launchpad.net/lxml/+bug/1930224

Failed tests report:

=================================== FAILURES ===================================
__________________ TestSoupContains.test_contains_cdata_html ___________________

self = <tests.test_extra.test_soup_contains.TestSoupContains
testMethod=test_contains_cdata_html>

    def test_contains_cdata_html(self):
        """Test contains CDATA in HTML5."""
    
        markup = """
        <body><div id="1">Testing that <span 
id="2"><![CDATA[that]]></span>contains works.</div></body>
        """
    
>       self.assert_selector(
            markup,
            'body *:-soup-contains("that")',
            ['1'],
            flags=util.HTML
        )

tests/test_extra/test_soup_contains.py:154: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/util.py:122: in assert_selector
    self.assertEqual(sorted(ids), sorted(expected_ids))
E   AssertionError: Lists differ: ['1', '2'] != ['1']
E   
E   First list contains 1 additional elements.
E   First extra element 1:
E   '2'
E   
E   - ['1', '2']
E   + ['1']
----------------------------- Captured stdout call -----------------------------
----Running Selector Test----
PATTERN:  body *:-soup-contains("that")
## PARSING: 'body *:-soup-contains("that")'
TOKEN: 'tag' --> 'body' at position 0
TOKEN: 'combine' --> ' ' at position 4
TOKEN: 'tag' --> '*' at position 5
TOKEN: 'pseudo_contains' --> ':-soup-contains("that")' at position 6
## END PARSING

====PARSER:  html5lib
TAG:  div

====PARSER:  lxml
TAG:  div
TAG:  span
_______________ TestSoupContainsOwn.test_contains_own_cdata_html _______________

self = <tests.test_extra.test_soup_contains_own.TestSoupContainsOwn
testMethod=test_contains_own_cdata_html>

    def test_contains_own_cdata_html(self):
        """Test contains CDATA in HTML5."""
    
        markup = """
        <body><div id="1">Testing that <span 
id="2"><![CDATA[that]]></span>contains works.</div></body>
        """
    
>       self.assert_selector(
            markup,
            'body *:-soup-contains-own("that")',
            ['1'],
            flags=util.HTML
        )

tests/test_extra/test_soup_contains_own.py:45: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/util.py:122: in assert_selector
    self.assertEqual(sorted(ids), sorted(expected_ids))
E   AssertionError: Lists differ: ['1', '2'] != ['1']
E   
E   First list contains 1 additional elements.
E   First extra element 1:
E   '2'
E   
E   - ['1', '2']
E   + ['1']
----------------------------- Captured stdout call -----------------------------
----Running Selector Test----
PATTERN:  body *:-soup-contains-own("that")
## PARSING: 'body *:-soup-contains-own("that")'
TOKEN: 'tag' --> 'body' at position 0
TOKEN: 'combine' --> ' ' at position 4
TOKEN: 'tag' --> '*' at position 5
TOKEN: 'pseudo_contains' --> ':-soup-contains-own("that")' at position 6
## END PARSING

====PARSER:  html5lib
TAG:  div

====PARSER:  lxml
TAG:  div
TAG:  span
=========================== short test summary info ============================
FAILED 
tests/test_extra/test_soup_contains.py::TestSoupContains::test_contains_cdata_html
FAILED 
tests/test_extra/test_soup_contains_own.py::TestSoupContainsOwn::test_contains_own_cdata_html

** Affects: soupsieve (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: ftbfs

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1945788

Title:
  FTBFS 2.2.1-1 HTML CDATA handling

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/soupsieve/+bug/1945788/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to