CINXE.COM

Bug #2076897 “lxml 5.3.0 DeprecationWarning” : Bugs : Beautiful Soup

<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr"> <head> <base href="https://bugs.launchpad.net/beautifulsoup/+bug/2076897/+index" /> <meta charset="UTF-8" /> <title>Bug #2076897 “lxml 5.3.0 DeprecationWarning” : Bugs : Beautiful Soup</title> <link rel="apple-touch-icon" sizes="180x180" href="/@@/apple-touch-icon.png?v=2022" /> <link rel="icon" type="image/png" sizes="32x32" href="/@@/favicon-32x32.png?v=2022" /> <link rel="icon" type="image/png" sizes="16x16" href="/@@/favicon-16x16.png?v=2022" /> <link rel="manifest" href="/@@/site.webmanifest?v=2022" /> <link rel="mask-icon" href="/@@/safari-pinned-tab.svg?v=2022" color="#e9531f" /> <link rel="shortcut icon" href="/@@/favicon.ico?v=2022" /> <meta name="msapplication-TileColor" content="#da532c" /> <meta name="msapplication-config" content="/@@/browserconfig.xml?v=2022" /> <meta name="theme-color" content="#ffffff" /> <link rel="canonical" href="https://bugs.launchpad.net/bugs/2076897" /> <link rel="alternate" type="application/atom+xml" href="http://feeds.launchpad.net/bugs/2076897/bug.atom" title="Bug 2076897 Feed" /> <link type="text/css" rel="stylesheet" media="screen, print" href="/+icing/rev22ade00ab50b929fac63b8ee7252243aceda294a/combo.css" /> <meta name="description" content="When running tests of soupsieve or bs4 with lxml 5.3.0, it raises: /usr/lib/python3.13/site-packages/bs4/builder/_lxml.py:124: DeprecationWarning: The 'strip_cdata' option of HTMLParser() has never done anything and will eventually be removed. And because some tests count the amount of warnings watched, they fail: =================================== FAILURES =================================== _________________ TestLXMLTreeBuilder.test_real_xhtml_document _________________ self = &lt;bs4.tes..." /> <meta property="og:description" content="When running tests of soupsieve or bs4 with lxml 5.3.0, it raises: /usr/lib/python3.13/site-packages/bs4/builder/_lxml.py:124: DeprecationWarning: The 'strip_cdata' option of HTMLParser() has never done anything and will eventually be removed. And because some tests count the amount of warnings watched, they fail: =================================== FAILURES =================================== _________________ TestLXMLTreeBuilder.test_real_xhtml_document _________________ self = &lt;bs4.tes..." /> <meta property="og:title" content="Bug #2076897 “lxml 5.3.0 DeprecationWarning” : Bugs : Beautiful Soup" /> <meta property="og:type" content="website" /> <meta property="og:image" content="/@@/launchpad-og-image.png" /> <meta property="og:url" content="https://bugs.launchpad.net/bugs/2076897" /> <meta property="og:site_name" content="Launchpad" /> <script type="text/javascript"> var LP = { cache: {}, links: {} }; </script> <script type="text/javascript">var cookie_scope = '; Path=/; Secure; Domain=.launchpad.net';</script> <script type="text/javascript" src="/+combo/rev22ade00ab50b929fac63b8ee7252243aceda294a/?yui/yui/yui-min.js&amp;lp/meta.js&amp;yui/loader/loader-min.js"></script> <script type="text/javascript"> var raw = null; if (LP.devmode) { raw = 'raw'; } YUI.GlobalConfig = { combine: true, comboBase: '/+combo/rev22ade00ab50b929fac63b8ee7252243aceda294a/?', root: 'yui/', filter: raw, debug: false, fetchCSS: false, maxURLLength: 2000, groups: { lp: { combine: true, base: '/+combo/rev22ade00ab50b929fac63b8ee7252243aceda294a/?lp/', comboBase: '/+combo/rev22ade00ab50b929fac63b8ee7252243aceda294a/?', root: 'lp/', // comes from including lp/meta.js modules: LP_MODULES, fetchCSS: false } } }</script> <script type="text/javascript"> // we need this to create a single YUI instance all events and code // talks across. All instances of YUI().use should be based off of // LPJS instead. var LPJS = new YUI(); </script> <script id="base-layout-load-scripts" type="text/javascript"> //<![CDATA[ LPJS.use('base', 'node', 'console', 'event', 'oop', 'lp', 'lp.app.foldables','lp.app.sorttable', 'lp.app.inlinehelp', 'lp.app.links', 'lp.bugs.bugtask_index', 'lp.bugs.subscribers', 'lp.app.ellipsis', 'lp.code.branchmergeproposal.diff', 'lp.views.global', function(Y) { Y.on("domready", function () { var global_view = new Y.lp.views.Global(); global_view.render(); Y.lp.app.sorttable.SortTable.init(); Y.lp.app.inlinehelp.init_help(); Y.lp.activate_collapsibles(); Y.lp.app.foldables.activate(); Y.lp.app.links.check_valid_lp_links(); }); Y.on('lp:context:web_link:changed', function(e) { window.location = e.new_value; }); }); //]]> </script> <script id="base-helper-functions" type="text/javascript"> //<![CDATA[ // This code is pulled from lp.js that needs to be available on every // request. Pulling here to get it outside the scope of the YUI block. function setFocusByName(name) { // Focus the first element matching the given name which can be focused. var nodes = document.getElementsByName(name); var i, node; for (i = 0; i < nodes.length; i++) { node = nodes[i]; if (node.focus) { try { // Trying to focus a hidden element throws an error in IE8. if (node.offsetHeight !== 0) { node.focus(); } } catch (e) { LPJS.use('console', function(Y) { Y.log('In setFocusByName(<' + node.tagName + ' type=' + node.type + '>): ' + e); }); } break; } } } function selectWidget(widget_name, event) { if (event && (event.keyCode === 9 || event.keyCode === 13)) { // Avoid firing if user is tabbing through or simply pressing // enter to submit the form. return; } document.getElementById(widget_name).checked = true; } //]]> </script> <script type="text/javascript" id="available-official-tags-js">var available_official_tags = [];</script> <script type="text/javascript"> LPJS.use('base', 'node', 'oop', 'event', 'lp.bugs.bugtask_index', 'lp.bugs.subscribers', 'lp.code.branchmergeproposal.diff', 'lp.app.comment', 'lp.services.messages.edit', function(Y) { Y.on('domready', function() { Y.lp.code.branchmergeproposal.diff.connect_diff_links(); Y.lp.bugs.bugtask_index.setup_bugtask_index(); Y.lp.bugs.bugtask_index.setup_bugtask_table(); LP.cache.comment_context = LP.cache.bug; var cl = new Y.lp.app.comment.CommentList(); cl.render(); var sl = new Y.lp.bugs.subscribers.createBugSubscribersLoader({ container_box: '#other-bug-subscribers', subscribers_details_view: '/+bug-portlet-subscribers-details', subscribe_someone_else_link: '.menu-link-addsubscriber' }, window); Y.lp.services.messages.edit.setup(); }); }); </script> <style type="text/css"> /* Align the 'add comment' link to the right of the comment box. */ #add-comment-form textarea { width: 100%; } #add-comment-form { max-width: 60em; padding-bottom: 4em; } #add-comment-form .actions {float: right;} .buglink-summary dd { font-size: 10px; } a#privacy-link:link:hover, a#privacy-link:visited:hover {text-decoration:none;} </style> <style type="text/css"> .yui3-overlay .value label { /* It normally makes sense for form labels to be bold, but since this form consists only of radio buttons, there's nothing but labels so we just get wall-to-wall bold. */ font-weight: normal !important; } </style> </head> <body id="document" itemscope="" itemtype="http://schema.org/WebPage" class="tab-bugs main_side public yui3-skin-sam"> <div class="yui-d0"> <div id="locationbar" class="login-logout"> <div id="logincontrol"><a href="https://bugs.launchpad.net/beautifulsoup/+bug/2076897/+login">Log in / Register</a></div> </div><!--id="locationbar"--> <div id="watermark" class="watermark-apps-portlet"> <div> <a href="https://launchpad.net/beautifulsoup"><img alt="" width="64" height="64" src="/@@/product-logo" /></a> </div> <div class="wide"> <h2 id="watermark-heading"><a href="https://launchpad.net/beautifulsoup">Beautiful Soup</a></h2> </div> <!-- Application Menu --> <ul class="facetmenu"> <li class="overview"><a href="https://launchpad.net/beautifulsoup">Overview</a></li> <li class="branches"><a href="https://code.launchpad.net/beautifulsoup">Code</a></li> <li class="bugs active"><a href="https://bugs.launchpad.net/beautifulsoup">Bugs</a></li> <li class="specifications"><a href="https://blueprints.launchpad.net/beautifulsoup">Blueprints</a></li> <li class="translations"><a href="https://translations.launchpad.net/beautifulsoup">Translations</a></li> <li class="answers"><a href="https://answers.launchpad.net/beautifulsoup">Answers</a></li> </ul> </div> <div class="yui-t4"> <div id="maincontent" class="yui-main"> <div class="yui-b" dir="ltr"> <div class="context-publication"> <h1 id="edit-title"> <span class="yui3-editable_text-text ellipsis" style="max-width: 95%;"> lxml 5.3.0 DeprecationWarning </span> </h1> <div id="registration" class="registering"> Bug #2076897 reported by <a href="https://launchpad.net/~frenzy-madness" class="sprite person">frenzy</a> <time title="2024-08-13 09:53:01 UTC" datetime="2024-08-13T09:53:01.343777+00:00">on 2024-08-13</time> </div> </div> <div id="request-notifications"> </div> <div> <div id="bug-is-duplicate"> </div> <div style="float: right;"> <span><a href="/+help-bugs/bug-heat.html" target="help" class="sprite flame">10</a></span> </div> <div class="actions"> <span id="affectsmetoo" style="display: inline">This bug affects 2 people</span> </div> <table id="affected-software" class="listing"> <thead> <tr> <th colspan="2">Affects</th> <th>Status</th> <th>Importance</th> <th>Assigned to</th> <th>Milestone</th> </tr> </thead> <tbody> <tr class="highlight" id="tasksummary3243234"> <td> </td> <td> <span id="bugtarget-picker-tasksummary3243234"> <span class="yui3-activator-data-box"> <a class="sprite product" href="https://bugs.launchpad.net/beautifulsoup">Beautiful Soup</a> </span> <div class="yui3-activator-message-box yui3-activator-hidden"></div> </span> </td> <td style="width: 20%; vertical-align: middle"> <div class="status-content" style="width: 100%; float: left"> <span style="float: left" class="value statusFIXCOMMITTED">Fix Committed</span> </div> </td> <td style="width: 15em; vertical-align: middle"> <div class="importance-content" style="width: 100%; float: left"> <span style="float: left" class="value importanceUNDECIDED">Undecided</span> </div> </td> <td style="width:20%; margin: 0; padding: 0; vertical-align: middle; padding-left: 0.5em"> <span id="assignee-picker-tasksummary3243234"> <span class="yui3-activator-data-box"> Unassigned </span> <div class="yui3-activator-message-box yui3-activator-hidden"></div> </span> </td> <td style="width: 20%; vertical-align: middle"> <div class="milestone-content" style="width: 100%; float: left"> <a class="value" href=""></a> </div> </td> </tr> <tr id="tasksummary3244768"> <td> </td> <td> <span id="bugtarget-picker-tasksummary3244768"> <span class="yui3-activator-data-box"> <a class="sprite package-source" href="https://bugs.launchpad.net/debian/+source/beautifulsoup4" title="Latest release: 4.12.3-3, uploaded to main on 2024-08-21 22:30:37.087000+00:00 by Debian Python Team (team+python), maintained by Debian Python Team (team+python)">beautifulsoup4 (Debian)</a> </span> <div class="yui3-activator-message-box yui3-activator-hidden"></div> </span> </td> <td style="width: 20%; vertical-align: middle"> <div class="status-content" style="width: 100%; float: left"> <span style="float: left" class="value statusFIXRELEASED">Fix Released</span> </div> </td> <td style="width: 15em; vertical-align: middle"> <div class="importance-content" style="width: 100%; float: left"> <span style="float: left" class="value importanceUNKNOWN">Unknown</span> </div> </td> <td style="width:20%; margin: 0; padding: 0; vertical-align: middle; padding-left: 0.5em"> <div style="text-decoration: none; padding: 0.25em"> <span class="sprite bug-remote"></span> <a class="link-external" href="https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1079205">debbugs #1079205</a> </div> </td> <td style="width: 20%; vertical-align: middle"> </td> </tr> </tbody> </table> <div id="maincontentsub"> <div class="top-portlet"> <div itemprop="mainContentOfPage" class="report"> <div> <div class="lazr-multiline-edit" id="edit-description"> <div class="clearfix"> <h3>Bug Description</h3> </div> <div class="yui3-editable_text-text"><p>When running tests of soupsieve or bs4 with lxml 5.3.0, it raises:</p> <p>/usr/lib/<wbr />python3.<wbr />13/site-<wbr />packages/<wbr />bs4/builder/<wbr />_lxml.py:<wbr />124: DeprecationWarning: The &#x27;strip_cdata&#x27; option of HTMLParser() has never done anything and will eventually be removed.</p> <p>And because some tests count the amount of warnings watched, they fail:</p> <p>=======<wbr />=======<wbr />=======<wbr />=======<wbr />======= FAILURES =======<wbr />=======<wbr />=======<wbr />=======<wbr />=======<br /> _________________ TestLXMLTreeBui<wbr />lder.test_<wbr />real_xhtml_<wbr />document _________________</p> <p>self = &lt;bs4.tests.<wbr />test_lxml.<wbr />TestLXMLTreeBui<wbr />lder object at 0x7f58bd530dd0&gt;</p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;def test_real_<wbr />xhtml_document(<wbr />self):<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;&quot;&quot;A real XHTML document should come out more or less the same as it went in.&quot;&quot;&quot;<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;markup = b&quot;&quot;&quot;&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;<br /> &nbsp;&nbsp;&nbsp;&nbsp;&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot;&gt;<br /> &nbsp;&nbsp;&nbsp;&nbsp;&lt;html xmlns=&quot;<a rel="nofollow" href="http://www.w3.org/1999/xhtml">http://<wbr />www.w3.<wbr />org/1999/<wbr />xhtml</a>&quot;&gt;<br /> &nbsp;&nbsp;&nbsp;&nbsp;&lt;head&gt;<wbr />&lt;title&gt;<wbr />Hello.&lt;<wbr />/title&gt;<wbr />&lt;/head&gt;<br /> &nbsp;&nbsp;&nbsp;&nbsp;&lt;body&gt;<wbr />Goodbye.<wbr />&lt;/body&gt;<br /> &nbsp;&nbsp;&nbsp;&nbsp;&lt;/html&gt;&quot;&quot;&quot;<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;with warnings.<wbr />catch_warnings(<wbr />record=<wbr />True) as w:<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<wbr />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<wbr />&nbsp;&nbsp;soup = self.soup(markup)<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;assert soup.encode(<wbr />&quot;utf-8&quot;<wbr />).replace(<wbr />b&quot;\n&quot;, b&quot;&quot;) == markup.<wbr />replace(<wbr />b&quot;\n&quot;, b&quot;&quot;)</p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# No warning was issued about parsing an XML document as HTML,<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# because XHTML is both.<br /> &gt; assert w == []<br /> E AssertionError</p> <p>bs4/tests/<wbr />__init_<wbr />_.py:432: AssertionError<br /> ___________________ TestLXMLTreeBui<wbr />lder.test_<wbr />namespaced_<wbr />html ___________________</p> <p>self = &lt;bs4.tests.<wbr />test_lxml.<wbr />TestLXMLTreeBui<wbr />lder object at 0x7f58bd530c50&gt;</p> <p>&nbsp;&nbsp;&nbsp;&nbsp;def test_namespaced<wbr />_html(self)<wbr />:<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# When a namespaced XML document is parsed as HTML it should<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# be treated as HTML with weird tag names.<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;markup = b&quot;&quot;&quot;&lt;ns1:<wbr />foo&gt;content&lt;<wbr />/ns1:foo&gt;<wbr />&lt;ns1:foo/<wbr />&gt;&lt;ns2:foo/<wbr />&gt;&quot;&quot;&quot;<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;with warnings.<wbr />catch_warnings(<wbr />record=<wbr />True) as w:<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soup = self.soup(markup)</p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;assert 2 == len(soup.<wbr />find_all(<wbr />&quot;ns1:foo&quot;<wbr />))</p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# n.b. no &quot;you&#x27;re parsing XML as HTML&quot; warning was given<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# because there was no XML declaration.<br /> &gt; assert [] == w<br /> E AssertionError</p> <p>bs4/tests/<wbr />__init_<wbr />_.py:446: AssertionError<br /> ______________ TestLXMLTreeBui<wbr />lder.test_<wbr />detect_<wbr />xml_parsed_<wbr />as_html ______________</p> <p>self = &lt;bs4.tests.<wbr />test_lxml.<wbr />TestLXMLTreeBui<wbr />lder object at 0x7f58bd38b540&gt;</p> <p>&nbsp;&nbsp;&nbsp;&nbsp;def test_detect_<wbr />xml_parsed_<wbr />as_html(<wbr />self):<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# A warning is issued when parsing an XML document as HTML,<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# but basic stuff should still work.<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;markup = b&quot;&quot;&quot;&lt;?xml version=&quot;1.0&quot; encoding=<wbr />&quot;utf-8&quot;<wbr />?&gt;&lt;tag&gt;<wbr />string&lt;<wbr />/tag&gt;&quot;&quot;<wbr />&quot;<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;with warnings.<wbr />catch_warnings(<wbr />record=<wbr />True) as w:<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soup = self.soup(markup)<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;assert soup.tag.string == &#x27;string&#x27;<br /> &gt; [warning] = w<br /> E ValueError: too many values to unpack (expected 1)</p> <p>bs4/tests/<wbr />__init_<wbr />_.py:455: ValueError<br /> =======<wbr />=======<wbr />=======<wbr />=======<wbr />=== warnings summary =======<wbr />=======<wbr />=======<wbr />=======<wbr />===<br /> bs4/tests/<wbr />test_fuzz.<wbr />py: 1 warning<br /> bs4/tests/<wbr />test_lxml.<wbr />py: 90 warnings<br /> bs4/tests/<wbr />test_tree.<wbr />py: 1 warning<br /> &nbsp;&nbsp;/builddir/<wbr />build/BUILD/<wbr />python-<wbr />beautifulsoup4-<wbr />4.12.3-<wbr />build/beautiful<wbr />soup4-4.<wbr />12.3/bs4/<wbr />builder/<wbr />_lxml.py:<wbr />124: DeprecationWarning: The &#x27;strip_cdata&#x27; option of HTMLParser() has never done anything and will eventually be removed.<br /> &nbsp;&nbsp;&nbsp;&nbsp;parser = parser(</p> <p>-- Docs: <a rel="nofollow" href="https://docs.pytest.org/en/stable/how-to/capture-warnings.html">https:/<wbr />/docs.pytest.<wbr />org/en/<wbr />stable/<wbr />how-to/<wbr />capture-<wbr />warnings.<wbr />html</a><br /> =======<wbr />=======<wbr />=======<wbr />====== short test summary info =======<wbr />=======<wbr />=======<wbr />=======<br /> FAILED bs4/tests/<wbr />test_lxml.<wbr />py::TestLXMLTre<wbr />eBuilder:<wbr />:test_real_<wbr />xhtml_document<br /> FAILED bs4/tests/<wbr />test_lxml.<wbr />py::TestLXMLTre<wbr />eBuilder:<wbr />:test_namespace<wbr />d_html - As...<br /> FAILED bs4/tests/<wbr />test_lxml.<wbr />py::TestLXMLTre<wbr />eBuilder:<wbr />:test_detect_<wbr />xml_parsed_<wbr />as_html<br /> ============ 3 failed, 654 passed, 7 skipped, 92 warnings in 1.42s =============</p></div> </div> </div> <div style="margin:-10px 0 20px 5px" class="clearfix"> </div> <div id="bug-tags"> <span id="tags-heading"> </span> <span id="tag-list"> </span> </div> <script type="text/javascript"> LPJS.use('event', 'node', 'lp.bugs.tags_entry', function(Y) { Y.on('domready', function(e) { Y.lp.bugs.tags_entry.setup_tag_entry( available_official_tags); }, window); }); </script> <div class="clearfix"></div> </div> <div id="branches-and-cves"> <div id="bug-branches-container" style="float: left"> <div id="bug-branches"> <h2>Related branches</h2> <div class="buglink-summary"> <a class="sprite branch" href="https://code.launchpad.net/~stefanor/beautifulsoup/+git/beautifulsoup/+ref/lxml-5.3.0">~stefanor/beautifulsoup:lxml-5.3.0</a> <div class="reviews"> <div> <img src="/@@/merge-proposal-icon" /> <a href="https://code.launchpad.net/~stefanor/beautifulsoup/+git/beautifulsoup/+merge/471742" title="">Merged</a> into <a href="https://code.launchpad.net/~leonardr/beautifulsoup/+git/beautifulsoup/+ref/master">beautifulsoup:master</a> at <a href="https://git.launchpad.net/beautifulsoup/commit/?id=40176e276f1511620aadc8bea1967f3b741a5a03"> revision 40176e276f1511620aadc8bea1967f3b741a5a03 </a> </div> <dl class="reviews"> <dd> <a href="https://launchpad.net/~leonardr" class="sprite person">Leonard Richardson</a>: <span class="voteAPPROVE">Approve</span> <time title="2024-08-22 00:25:30 UTC" datetime="2024-08-22T00:25:30.397834+00:00">on 2024-08-22</time> </dd> <dd class="popup-diff mp-471742"> Diff: <a href="https://code.launchpad.net/~stefanor/beautifulsoup/+git/beautifulsoup/+merge/471742/+preview-diff/1066501/+files/preview.diff" class="diff-link">21 lines (+2/-2)</a><div class="collapsible"><span>1 file modified</span><div>bs4/builder/_lxml.py (+2/-2)</div></div> <a class="api-ref hidden" href="/~stefanor/beautifulsoup/+git/beautifulsoup/+merge/471742/+preview-diff/1066501">api</a> </dd> </dl> </div> </div> </div> </div><!-- bug-branch-container --> <div class="clearfix"></div> </div> <!-- branches and CVEs --> </div> <div> <div xmlns="http://www.w3.org/1999/xhtml" itemscope="" itemtype="http://schema.org/UserComments" class="boardComment editable-message " data-baseurl="/beautifulsoup/+bug/2076897/comments/1" data-i-can-edit="False"> <div class="boardCommentDetails"> <div class="message-revision-container"> <div class="message-revision-container-header"> <span>Revision history for this message</span> <img src="/+icing/build/overlay/assets/skins/sam/images/close.gif" class="message-revision-close" /> </div> <script type="text/template"> <div class='message-revision-item'> <div class='message-revision-title'> <a class="sprite remove action-icon message-revision-del-btn"> Remove </a> <a class="js-action"> Revision #{revision}, created at {date_created_display} </a> </div> <div class='message-revision-body'>{content}</div> </div> </script> <div class="message-revision-list"></div> </div> <table> <tbody> <tr> <td> <a href="https://launchpad.net/~facelessuser" class="sprite person">Isaac Muse (facelessuser)</a> wrote <time itemprop="commentTime" datetime="2024-08-13T13:27:19.002219+00:00" title="2024-08-13 13:27:19 UTC">on 2024-08-13</time><span class="editable-message-last-edit-date">: </span> </td> <td> </td> <td> </td> <td class="bug-comment-index"> <a itemprop="url" href="/beautifulsoup/+bug/2076897/comments/1"> #1</a> </td> </tr> </tbody> </table> </div> <div class="boardCommentBody"> <div class="editable-message-body"> <div class="comment-text editable-message-text" itemprop="commentText"><p>As far as soupsieve is concerned, I am updating tests to ignore this warning. I was waiting for the latest LXML support before I pushed Python 3.13 support. Now that LXML 5.3 is out, I will have a new release out shortly. All tests passing in PR: <a rel="nofollow" href="https://github.com/facelessuser/soupsieve/pull/271">https:/<wbr />/github.<wbr />com/facelessuse<wbr />r/soupsieve/<wbr />pull/271</a>.</p></div> </div> <div class="editable-message-form" style="display: none"> <textarea style="width: 100%" rows="10">As far as soupsieve is concerned, I am updating tests to ignore this warning. I was waiting for the latest LXML support before I pushed Python 3.13 support. Now that LXML 5.3 is out, I will have a new release out shortly. All tests passing in PR: https://github.com/facelessuser/soupsieve/pull/271.</textarea> <input type="button" value="Update" class="editable-message-update-btn" /> <input type="button" value="Cancel" class="editable-message-cancel-btn" /> </div> </div> </div> <div xmlns="http://www.w3.org/1999/xhtml" itemscope="" itemtype="http://schema.org/UserComments" class="boardComment editable-message " data-baseurl="/beautifulsoup/+bug/2076897/comments/2" data-i-can-edit="False"> <div class="boardCommentDetails"> <div class="message-revision-container"> <div class="message-revision-container-header"> <span>Revision history for this message</span> <img src="/+icing/build/overlay/assets/skins/sam/images/close.gif" class="message-revision-close" /> </div> <script type="text/template"> <div class='message-revision-item'> <div class='message-revision-title'> <a class="sprite remove action-icon message-revision-del-btn"> Remove </a> <a class="js-action"> Revision #{revision}, created at {date_created_display} </a> </div> <div class='message-revision-body'>{content}</div> </div> </script> <div class="message-revision-list"></div> </div> <table> <tbody> <tr> <td> <a href="https://launchpad.net/~frenzy-madness" class="sprite person">frenzy (frenzy-madness)</a> wrote <time itemprop="commentTime" datetime="2024-08-13T22:16:40.130260+00:00" title="2024-08-13 22:16:40 UTC">on 2024-08-13</time><span class="editable-message-last-edit-date">: </span> </td> <td> </td> <td> </td> <td class="bug-comment-index"> <a itemprop="url" href="/beautifulsoup/+bug/2076897/comments/2"> #2</a> </td> </tr> </tbody> </table> </div> <div class="boardCommentBody"> <div class="editable-message-body"> <div class="comment-text editable-message-text" itemprop="commentText"><p>I&#x27;ve fixed the compatibility of bs4 with the latest lxml by: sed -i &quot;s/strip_<wbr />cdata=False,<wbr />//&quot; bs4/builder/<wbr />_lxml.py</p> <p>and that transitively fixed also our builds of soupsieve in Fedora Linux.</p></div> </div> <div class="editable-message-form" style="display: none"> <textarea style="width: 100%" rows="10">I've fixed the compatibility of bs4 with the latest lxml by: sed -i "s/strip_cdata=False,//" bs4/builder/_lxml.py and that transitively fixed also our builds of soupsieve in Fedora Linux.</textarea> <input type="button" value="Update" class="editable-message-update-btn" /> <input type="button" value="Cancel" class="editable-message-cancel-btn" /> </div> </div> </div> <div class="boardComment"> <div class="boardCommentDetails"> <a href="https://launchpad.net/~bug-watch-updater" class="sprite person-inactive">Bug Watch Updater (bug-watch-updater)</a> <time title="2024-08-21 16:09:25 UTC" datetime="2024-08-21T16:09:25.198437+00:00">on 2024-08-21</time> </div> <div class="boardCommentActivity"> <table class="bug-activity"> <tr> <td colspan="2">Changed in beautifulsoup4 (Debian): </td> </tr> <tr> <td style="text-align: right;"> <b>status</b>: </td> <td> Unknown &#8594; Confirmed </td> </tr> </table> </div> </div> <div xmlns="http://www.w3.org/1999/xhtml" itemscope="" itemtype="http://schema.org/UserComments" class="boardComment editable-message " data-baseurl="/beautifulsoup/+bug/2076897/comments/3" data-i-can-edit="False"> <div class="boardCommentDetails"> <div class="message-revision-container"> <div class="message-revision-container-header"> <span>Revision history for this message</span> <img src="/+icing/build/overlay/assets/skins/sam/images/close.gif" class="message-revision-close" /> </div> <script type="text/template"> <div class='message-revision-item'> <div class='message-revision-title'> <a class="sprite remove action-icon message-revision-del-btn"> Remove </a> <a class="js-action"> Revision #{revision}, created at {date_created_display} </a> </div> <div class='message-revision-body'>{content}</div> </div> </script> <div class="message-revision-list"></div> </div> <table> <tbody> <tr> <td> <a href="https://launchpad.net/~leonardr" class="sprite person">Leonard Richardson (leonardr)</a> wrote <time itemprop="commentTime" datetime="2024-08-22T00:26:39.058335+00:00" title="2024-08-22 00:26:39 UTC">on 2024-08-22</time><span class="editable-message-last-edit-date">: </span> </td> <td> </td> <td> </td> <td class="bug-comment-index"> <a itemprop="url" href="/beautifulsoup/+bug/2076897/comments/3"> #3</a> </td> </tr> </tbody> </table> </div> <div class="boardCommentBody"> <div class="editable-message-body"> <div class="comment-text editable-message-text" itemprop="commentText"><p>I&#x27;ve ported Stefano Rivera&#x27;s fix to this bug as well as his soupsieve 2.6 fix to the master branch (revision 9786a62726de5a8<wbr />caba10021c4d4a5<wbr />8c8a3e9e3f) the 4.13 branch (revision 0298724f4a728ca<wbr />89cefaeb7357792<wbr />9168af1b23)<wbr />.</p></div> </div> <div class="editable-message-form" style="display: none"> <textarea style="width: 100%" rows="10">I've ported Stefano Rivera's fix to this bug as well as his soupsieve 2.6 fix to the master branch (revision 9786a62726de5a8caba10021c4d4a58c8a3e9e3f) the 4.13 branch (revision 0298724f4a728ca89cefaeb73577929168af1b23). </textarea> <input type="button" value="Update" class="editable-message-update-btn" /> <input type="button" value="Cancel" class="editable-message-cancel-btn" /> </div> </div> <div class="boardCommentActivity"> <table class="bug-activity"> <tr> <td colspan="2">Changed in beautifulsoup: </td> </tr> <tr> <td style="text-align: right;"> <b>status</b>: </td> <td> New &#8594; Fix Committed </td> </tr> </table> </div> </div> <div xmlns="http://www.w3.org/1999/xhtml" itemscope="" itemtype="http://schema.org/UserComments" class="boardComment editable-message " data-baseurl="/beautifulsoup/+bug/2076897/comments/4" data-i-can-edit="False"> <div class="boardCommentDetails"> <div class="message-revision-container"> <div class="message-revision-container-header"> <span>Revision history for this message</span> <img src="/+icing/build/overlay/assets/skins/sam/images/close.gif" class="message-revision-close" /> </div> <script type="text/template"> <div class='message-revision-item'> <div class='message-revision-title'> <a class="sprite remove action-icon message-revision-del-btn"> Remove </a> <a class="js-action"> Revision #{revision}, created at {date_created_display} </a> </div> <div class='message-revision-body'>{content}</div> </div> </script> <div class="message-revision-list"></div> </div> <table> <tbody> <tr> <td> <a href="https://launchpad.net/~facelessuser" class="sprite person">Isaac Muse (facelessuser)</a> wrote <time itemprop="commentTime" datetime="2024-08-22T00:55:26.748004+00:00" title="2024-08-22 00:55:26 UTC">on 2024-08-22</time><span class="editable-message-last-edit-date">: </span> </td> <td> </td> <td> </td> <td class="bug-comment-index"> <a itemprop="url" href="/beautifulsoup/+bug/2076897/comments/4"> #4</a> </td> </tr> </tbody> </table> </div> <div class="boardCommentBody"> <div class="editable-message-body"> <div class="comment-text editable-message-text" itemprop="commentText"><p>Leonard, there is nothing in 2.6 that is required to allow Beautiful Soup to not fail. All we did is ignore the warning in our tests so people could would not get failures. 2.6 is not absolutely required. There were no functional changes for 3.13 or for LXML.</p></div> </div> <div class="editable-message-form" style="display: none"> <textarea style="width: 100%" rows="10">Leonard, there is nothing in 2.6 that is required to allow Beautiful Soup to not fail. All we did is ignore the warning in our tests so people could would not get failures. 2.6 is not absolutely required. There were no functional changes for 3.13 or for LXML.</textarea> <input type="button" value="Update" class="editable-message-update-btn" /> <input type="button" value="Cancel" class="editable-message-cancel-btn" /> </div> </div> </div> <div xmlns="http://www.w3.org/1999/xhtml" itemscope="" itemtype="http://schema.org/UserComments" class="boardComment editable-message " data-baseurl="/beautifulsoup/+bug/2076897/comments/5" data-i-can-edit="False"> <div class="boardCommentDetails"> <div class="message-revision-container"> <div class="message-revision-container-header"> <span>Revision history for this message</span> <img src="/+icing/build/overlay/assets/skins/sam/images/close.gif" class="message-revision-close" /> </div> <script type="text/template"> <div class='message-revision-item'> <div class='message-revision-title'> <a class="sprite remove action-icon message-revision-del-btn"> Remove </a> <a class="js-action"> Revision #{revision}, created at {date_created_display} </a> </div> <div class='message-revision-body'>{content}</div> </div> </script> <div class="message-revision-list"></div> </div> <table> <tbody> <tr> <td> <a href="https://launchpad.net/~facelessuser" class="sprite person">Isaac Muse (facelessuser)</a> wrote <time itemprop="commentTime" datetime="2024-08-22T01:07:25.397729+00:00" title="2024-08-22 01:07:25 UTC">on 2024-08-22</time><span class="editable-message-last-edit-date">: </span> </td> <td> </td> <td> </td> <td class="bug-comment-index"> <a itemprop="url" href="/beautifulsoup/+bug/2076897/comments/5"> #5</a> </td> </tr> </tbody> </table> </div> <div class="boardCommentBody"> <div class="editable-message-body"> <div class="comment-text editable-message-text" itemprop="commentText"><p>To better explain, we only failed because Beautiful Soup would cause the warning to be raised, so we now ignore it our tests and updated a test to better capture the warning we were targetting. If older versions of Soup Sieve are used it affects Beautiful Soup&#x27;s tests in no way and changes no behavior in that sense. I think throwing a warning requiring 2.6 is not required and a bit misleading.</p></div> </div> <div class="editable-message-form" style="display: none"> <textarea style="width: 100%" rows="10">To better explain, we only failed because Beautiful Soup would cause the warning to be raised, so we now ignore it our tests and updated a test to better capture the warning we were targetting. If older versions of Soup Sieve are used it affects Beautiful Soup's tests in no way and changes no behavior in that sense. I think throwing a warning requiring 2.6 is not required and a bit misleading.</textarea> <input type="button" value="Update" class="editable-message-update-btn" /> <input type="button" value="Cancel" class="editable-message-cancel-btn" /> </div> </div> </div> <div xmlns="http://www.w3.org/1999/xhtml" itemscope="" itemtype="http://schema.org/UserComments" class="boardComment editable-message " data-baseurl="/beautifulsoup/+bug/2076897/comments/6" data-i-can-edit="False"> <div class="boardCommentDetails"> <div class="message-revision-container"> <div class="message-revision-container-header"> <span>Revision history for this message</span> <img src="/+icing/build/overlay/assets/skins/sam/images/close.gif" class="message-revision-close" /> </div> <script type="text/template"> <div class='message-revision-item'> <div class='message-revision-title'> <a class="sprite remove action-icon message-revision-del-btn"> Remove </a> <a class="js-action"> Revision #{revision}, created at {date_created_display} </a> </div> <div class='message-revision-body'>{content}</div> </div> </script> <div class="message-revision-list"></div> </div> <table> <tbody> <tr> <td> <a href="https://launchpad.net/~leonardr" class="sprite person">Leonard Richardson (leonardr)</a> wrote <time itemprop="commentTime" datetime="2024-08-22T02:12:22.723440+00:00" title="2024-08-22 02:12:22 UTC">on 2024-08-22</time><span class="editable-message-last-edit-date">: </span> </td> <td> </td> <td> </td> <td class="bug-comment-index"> <a itemprop="url" href="/beautifulsoup/+bug/2076897/comments/6"> #6</a> </td> </tr> </tbody> </table> </div> <div class="boardCommentBody"> <div class="editable-message-body"> <div class="comment-text editable-message-text" itemprop="commentText"><p>I think I understand what you&#x27;re saying, and it means I need to clarify what I just did. The soupsieve-related change I made isn&#x27;t related to the change you made to Soup Sieve to ignore the lxml cdata warning (i.e. part of <a rel="nofollow" href="https://github.com/facelessuser/soupsieve/pull/271/">https:/<wbr />/github.<wbr />com/facelessuse<wbr />r/soupsieve/<wbr />pull/271/</a>). It&#x27;s related to this different change that you made in July: <a rel="nofollow" href="https://github.com/facelessuser/soupsieve/pull/270">https:/<wbr />/github.<wbr />com/facelessuse<wbr />r/soupsieve/<wbr />pull/270</a></p> <p>Beautiful Soup has a test that feeds a nonsensical pseudoclass and checks for an appropriate exception. Prior to 2.6 the appropriate exception was NotImplementedE<wbr />rror; now it&#x27;s SelectorSyntaxE<wbr />rror.</p> <p>Stefano&#x27;s proposal is here: <a rel="nofollow" href="https://code.launchpad.net/~stefanor/beautifulsoup/+git/beautifulsoup/+merge/471367">https:/<wbr />/code.launchpad<wbr />.net/~stefanor/<wbr />beautifulsoup/<wbr />+git/beautifuls<wbr />oup/+merge/<wbr />471367</a></p> <p>He changes the NotImplementedError to SelectorSyntaxE<wbr />rror, and changes tox.ini so that you need Soup Sieve 2.6 to run the unit tests. There&#x27;s no particular version requirement for Beautiful Soup itself, just the tests.</p> <p>That would work, except that Beautiful Soup still supports Python 3.7. Soup Sieve 2.6 doesn&#x27;t support 3.7, so setting a requirement of soupsieve&gt;=2.6 makes it impossible for me to run the Beautiful Soup unit tests on 3.7. But the old requirement (soupsieve&gt;=1.2) doesn&#x27;t work anymore either, because that&#x27;s saying either 2.6 or a pre-2.6 version will work.</p> <p>So I changed the appropriate test to check the version number of soupsieve. I test for NotImplementedError if &lt; 2.6 and SelectorSyntaxError if &gt;= 2.6. Once Beautiful Soup drops support for Python 3.7, we won&#x27;t need this extra complexity, and I&#x27;ll basically switch to Stefano&#x27;s proposal.</p></div> </div> <div class="editable-message-form" style="display: none"> <textarea style="width: 100%" rows="10">I think I understand what you're saying, and it means I need to clarify what I just did. The soupsieve-related change I made isn't related to the change you made to Soup Sieve to ignore the lxml cdata warning (i.e. part of https://github.com/facelessuser/soupsieve/pull/271/). It's related to this different change that you made in July: https://github.com/facelessuser/soupsieve/pull/270 Beautiful Soup has a test that feeds a nonsensical pseudoclass and checks for an appropriate exception. Prior to 2.6 the appropriate exception was NotImplementedError; now it's SelectorSyntaxError. Stefano's proposal is here: https://code.launchpad.net/~stefanor/beautifulsoup/+git/beautifulsoup/+merge/471367 He changes the NotImplementedError to SelectorSyntaxError, and changes tox.ini so that you need Soup Sieve 2.6 to run the unit tests. There's no particular version requirement for Beautiful Soup itself, just the tests. That would work, except that Beautiful Soup still supports Python 3.7. Soup Sieve 2.6 doesn't support 3.7, so setting a requirement of soupsieve&gt;=2.6 makes it impossible for me to run the Beautiful Soup unit tests on 3.7. But the old requirement (soupsieve&gt;=1.2) doesn't work anymore either, because that's saying either 2.6 or a pre-2.6 version will work. So I changed the appropriate test to check the version number of soupsieve. I test for NotImplementedError if &lt; 2.6 and SelectorSyntaxError if &gt;= 2.6. Once Beautiful Soup drops support for Python 3.7, we won't need this extra complexity, and I'll basically switch to Stefano's proposal.</textarea> <input type="button" value="Update" class="editable-message-update-btn" /> <input type="button" value="Cancel" class="editable-message-cancel-btn" /> </div> </div> </div> <div xmlns="http://www.w3.org/1999/xhtml" itemscope="" itemtype="http://schema.org/UserComments" class="boardComment editable-message " data-baseurl="/beautifulsoup/+bug/2076897/comments/7" data-i-can-edit="False"> <div class="boardCommentDetails"> <div class="message-revision-container"> <div class="message-revision-container-header"> <span>Revision history for this message</span> <img src="/+icing/build/overlay/assets/skins/sam/images/close.gif" class="message-revision-close" /> </div> <script type="text/template"> <div class='message-revision-item'> <div class='message-revision-title'> <a class="sprite remove action-icon message-revision-del-btn"> Remove </a> <a class="js-action"> Revision #{revision}, created at {date_created_display} </a> </div> <div class='message-revision-body'>{content}</div> </div> </script> <div class="message-revision-list"></div> </div> <table> <tbody> <tr> <td> <a href="https://launchpad.net/~facelessuser" class="sprite person">Isaac Muse (facelessuser)</a> wrote <time itemprop="commentTime" datetime="2024-08-22T05:11:57.502344+00:00" title="2024-08-22 05:11:57 UTC">on 2024-08-22</time><span class="editable-message-last-edit-date">: </span> </td> <td> </td> <td> </td> <td class="bug-comment-index"> <a itemprop="url" href="/beautifulsoup/+bug/2076897/comments/7"> #7</a> </td> </tr> </tbody> </table> </div> <div class="boardCommentBody"> <div class="editable-message-body"> <div class="comment-text editable-message-text" itemprop="commentText"><p>Oh, I see.</p></div> </div> <div class="editable-message-form" style="display: none"> <textarea style="width: 100%" rows="10">Oh, I see.</textarea> <input type="button" value="Update" class="editable-message-update-btn" /> <input type="button" value="Cancel" class="editable-message-cancel-btn" /> </div> </div> </div> <div class="boardComment"> <div class="boardCommentDetails"> <a href="https://launchpad.net/~bug-watch-updater" class="sprite person-inactive">Bug Watch Updater (bug-watch-updater)</a> <time title="2024-08-22 21:19:48 UTC" datetime="2024-08-22T21:19:48.333315+00:00">on 2024-08-22</time> </div> <div class="boardCommentActivity"> <table class="bug-activity"> <tr> <td colspan="2">Changed in beautifulsoup4 (Debian): </td> </tr> <tr> <td style="text-align: right;"> <b>status</b>: </td> <td> Confirmed &#8594; Fix Released </td> </tr> </table> </div> </div> <div style="float: right;"> <a class="menu-link-activitylog" href="https://bugs.launchpad.net/beautifulsoup/+bug/2076897/+activity">See full activity log</a> </div> <div class="clearfix"></div> <div align="center" id="add-comment-login-first"> To post a comment you must <a href="+login?comments=all">log in</a>. </div> </div><!-- class="top-portlet" --> </div><!--- id="maincontentsub"--> <div> <div id="duplicate-form-container"></div> <div id="privacy-form-container"></div> </div> </div> </div><!-- yui-b --> </div><!-- yui-main --> <div id="side-portlets" class="yui-b side"> <div id="involvement" class="portlet"> <ul class="involvement"> <li class="single"> <a class="sprite bugs" href="/beautifulsoup/+filebug"> Report a bug </a> </li> </ul> </div> <div id="privacy" class="first portlet public"> <div id="privacy-text"> <span id="information-type-summary" class="sprite public">This report contains <strong id="information-type">Public</strong> information </span>&nbsp; <div id="information-type-description" style="padding-top: 5px">Everyone can see this information. </div> </div> </div> <div id="portlet-actions" class="portlet vertical"> <ul id="duplicate-actions"> </ul> <ul id="lock-status-actions"> </ul> </div> <div class="portlet vertical" id="portlet-subscription"> <div class="section"> <div id="current_user_subscription" class="False"> <span>You are</span> <a class="menu-link-subscription sprite modify edit" href="/beautifulsoup/+bug/2076897/+subscribe"> not directly subscribed to this bug's notifications. </a> </div> <div id="sub-unsub-spinner">Subscribing...</div> <ul> <li><a class="menu-link-editsubscriptions sprite modify edit" href="https://bugs.launchpad.net/beautifulsoup/+bug/2076897/+subscriptions" title="View and change your subscriptions to this bug">Edit bug mail</a></li> </ul> </div> <script type="text/javascript"> LPJS.use('io-base', 'node', 'lp.bugs.bugtask_index.portlets.subscription', function(Y) { Y.on('domready', function() { Y.lp.bugs.bugtask_index.portlets.subscription.initialize(); }); }); </script> </div> <div class="portlet vertical" id="portlet-subscribers"> <h2>Other bug subscribers</h2> <div> <div><a class="menu-link-addsubscriber sprite add" href="https://bugs.launchpad.net/beautifulsoup/+bug/2076897/+addsubscriber" title="Launchpad will email that person whenever this bugs changes">Subscribe someone else</a></div> </div> <div id="other-bug-subscribers"></div> </div> <div class="portlet" id="portlet-watches"> <h2>Remote bug watches</h2> <ul> <li> <span class="sprite bug-remote"></span> <a class="link-external" href="https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1079205">debbugs #1079205</a> <br />[<span>done serious trixie sid</span>] <a class="sprite edit action-icon" title="Change watch details" href="/bugs/2076897/+watch/161389">Edit</a> </li> </ul> <p>Bug watches keep track of this bug in other bug trackers.</p> </div> </div><!-- yui-b side --> </div><!-- yui-t4 --> <div id="footer" class="footer"> <div class="lp-arcana"> <div class="lp-branding"> <a href="https://launchpad.net/"><img src="/@@/launchpad-footer-logo.svg" alt="Launchpad" width="65" height="18" /></a> &nbsp;&bull;&nbsp; <a href="https://launchpad.net/+tour">Take the tour</a> &nbsp;&bull;&nbsp; <a href="https://help.launchpad.net/">Read the guide</a> &nbsp; <form id="globalsearch" method="get" accept-charset="UTF-8" action="https://launchpad.net/+search"> <input type="search" id="search-text" name="field.text" /> <input type="image" src="/@@/search" style="vertical-align:5%" alt="Search Launchpad" /> </form> </div> </div> <div class="colophon"> &copy; 2004 <a href="http://canonical.com/">Canonical&nbsp;Ltd.</a> &nbsp;&bull;&nbsp; <a href="https://launchpad.net/legal">Terms of use</a> &nbsp;&bull;&nbsp; <a href="https://www.ubuntu.com/legal/dataprivacy">Data privacy</a> &nbsp;&bull;&nbsp; <a href="/feedback">Contact Launchpad Support</a> &nbsp;&bull;&nbsp; <a href="http://blog.launchpad.net/">Blog</a> &nbsp;&bull;&nbsp; <a href="https://canonical.com/careers">Careers</a> &nbsp;&bull;&nbsp; <a href="https://ubuntu.social/@launchpadstatus">System status</a> <span id="lp-version"> &nbsp;&bull;&nbsp; 22ade00 (<a href="https://dev.launchpad.net/">Get the code!</a>) </span> </div> </div> </div><!-- yui-d0--> <script id="json-cache-script">LP.cache = {"related_features": {}, "bug": {"self_link": "https://bugs.launchpad.net/api/devel/bugs/2076897", "web_link": "https://bugs.launchpad.net/bugs/2076897", "resource_type_link": "https://bugs.launchpad.net/api/devel/#bug", "id": 2076897, "private": false, "information_type": "Public", "name": null, "title": "lxml 5.3.0 DeprecationWarning", "description": "When running tests of soupsieve or bs4 with lxml 5.3.0, it raises:\n\n/usr/lib/python3.13/site-packages/bs4/builder/_lxml.py:124: DeprecationWarning: The 'strip_cdata' option of HTMLParser() has never done anything and will eventually be removed.\n\nAnd because some tests count the amount of warnings watched, they fail:\n\n=================================== FAILURES ===================================\n_________________ TestLXMLTreeBuilder.test_real_xhtml_document _________________\n\nself = \u003cbs4.tests.test_lxml.TestLXMLTreeBuilder object at 0x7f58bd530dd0\u003e\n\n def test_real_xhtml_document(self):\n \"\"\"A real XHTML document should come out more or less the same as it went in.\"\"\"\n markup = b\"\"\"\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n \u003c!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\u003e\n \u003chtml xmlns=\"http://www.w3.org/1999/xhtml\"\u003e\n \u003chead\u003e\u003ctitle\u003eHello.\u003c/title\u003e\u003c/head\u003e\n \u003cbody\u003eGoodbye.\u003c/body\u003e\n \u003c/html\u003e\"\"\"\n with warnings.catch_warnings(record=True) as w:\n soup = self.soup(markup)\n assert soup.encode(\"utf-8\").replace(b\"\\n\", b\"\") == markup.replace(b\"\\n\", b\"\")\n \n # No warning was issued about parsing an XML document as HTML,\n # because XHTML is both.\n\u003e assert w == []\nE AssertionError\n\nbs4/tests/__init__.py:432: AssertionError\n___________________ TestLXMLTreeBuilder.test_namespaced_html ___________________\n\nself = \u003cbs4.tests.test_lxml.TestLXMLTreeBuilder object at 0x7f58bd530c50\u003e\n\n def test_namespaced_html(self):\n # When a namespaced XML document is parsed as HTML it should\n # be treated as HTML with weird tag names.\n markup = b\"\"\"\u003cns1:foo\u003econtent\u003c/ns1:foo\u003e\u003cns1:foo/\u003e\u003cns2:foo/\u003e\"\"\"\n with warnings.catch_warnings(record=True) as w:\n soup = self.soup(markup)\n \n assert 2 == len(soup.find_all(\"ns1:foo\"))\n \n # n.b. no \"you're parsing XML as HTML\" warning was given\n # because there was no XML declaration.\n\u003e assert [] == w\nE AssertionError\n\nbs4/tests/__init__.py:446: AssertionError\n______________ TestLXMLTreeBuilder.test_detect_xml_parsed_as_html ______________\n\nself = \u003cbs4.tests.test_lxml.TestLXMLTreeBuilder object at 0x7f58bd38b540\u003e\n\n def test_detect_xml_parsed_as_html(self):\n # A warning is issued when parsing an XML document as HTML,\n # but basic stuff should still work.\n markup = b\"\"\"\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\u003ctag\u003estring\u003c/tag\u003e\"\"\"\n with warnings.catch_warnings(record=True) as w:\n soup = self.soup(markup)\n assert soup.tag.string == 'string'\n\u003e [warning] = w\nE ValueError: too many values to unpack (expected 1)\n\nbs4/tests/__init__.py:455: ValueError\n=============================== warnings summary ===============================\nbs4/tests/test_fuzz.py: 1 warning\nbs4/tests/test_lxml.py: 90 warnings\nbs4/tests/test_tree.py: 1 warning\n /builddir/build/BUILD/python-beautifulsoup4-4.12.3-build/beautifulsoup4-4.12.3/bs4/builder/_lxml.py:124: DeprecationWarning: The 'strip_cdata' option of HTMLParser() has never done anything and will eventually be removed.\n parser = parser(\n\n-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html\n=========================== short test summary info ============================\nFAILED bs4/tests/test_lxml.py::TestLXMLTreeBuilder::test_real_xhtml_document\nFAILED bs4/tests/test_lxml.py::TestLXMLTreeBuilder::test_namespaced_html - As...\nFAILED bs4/tests/test_lxml.py::TestLXMLTreeBuilder::test_detect_xml_parsed_as_html\n============ 3 failed, 654 passed, 7 skipped, 92 warnings in 1.42s =============", "owner_link": "https://bugs.launchpad.net/api/devel/~frenzy-madness", "bug_tasks_collection_link": "https://bugs.launchpad.net/api/devel/bugs/2076897/bug_tasks", "duplicate_of_link": null, "date_created": "2024-08-13T09:53:01.343777+00:00", "activity_collection_link": "https://bugs.launchpad.net/api/devel/bugs/2076897/activity", "subscriptions_collection_link": "https://bugs.launchpad.net/api/devel/bugs/2076897/subscriptions", "date_last_updated": "2024-09-08T15:27:24.294825+00:00", "who_made_private_link": null, "date_made_private": null, "heat": 10, "bug_watches_collection_link": "https://bugs.launchpad.net/api/devel/bugs/2076897/bug_watches", "cves_collection_link": "https://bugs.launchpad.net/api/devel/bugs/2076897/cves", "vulnerabilities_collection_link": "https://bugs.launchpad.net/api/devel/bugs/2076897/vulnerabilities", "duplicates_collection_link": "https://bugs.launchpad.net/api/devel/bugs/2076897/duplicates", "attachments_collection_link": "https://bugs.launchpad.net/api/devel/bugs/2076897/attachments", "security_related": false, "latest_patch_uploaded": null, "tags": [], "date_last_message": "2024-09-08T15:27:23.711987+00:00", "number_of_duplicates": 0, "message_count": 9, "users_affected_count": 2, "users_unaffected_count": 0, "users_affected_collection_link": "https://bugs.launchpad.net/api/devel/bugs/2076897/users_affected", "users_unaffected_collection_link": "https://bugs.launchpad.net/api/devel/bugs/2076897/users_unaffected", "users_affected_count_with_dupes": 2, "other_users_affected_count_with_dupes": 2, "users_affected_with_dupes_collection_link": "https://bugs.launchpad.net/api/devel/bugs/2076897/users_affected_with_dupes", "messages_collection_link": "https://bugs.launchpad.net/api/devel/bugs/2076897/messages", "lock_status": "Unlocked", "lock_reason": null, "linked_branches_collection_link": "https://bugs.launchpad.net/api/devel/bugs/2076897/linked_branches", "linked_merge_proposals_collection_link": "https://bugs.launchpad.net/api/devel/bugs/2076897/linked_merge_proposals", "http_etag": "\"2d69e5838cc3114352f4ba39a7b565ac895d30e5-a11e1a36b3fecceb34e1b832b2c15dd93650904f\""}, "subscribers_portlet_url_data": {"web_link": "https://bugs.launchpad.net/bugs/2076897", "self_link": "https://bugs.launchpad.net/api/devel/bugs/2076897"}, "total_comments_and_activity": 14, "initial_comment_batch_offset": 41, "first visible_recent_comment": -32, "bugtask_data": {"3243234": {"id": 3243234, "row_id": "tasksummary3243234", "form_row_id": "task3243234", "bugtask_path": "/beautifulsoup/+bug/2076897", "prefix": "beautifulsoup", "targetname": "Beautiful Soup", "bug_title": "lxml 5.3.0 DeprecationWarning", "assignee_value": null, "assignee_is_team": null, "assignee_vocabulary": "AllUserTeamsParticipation", "assignee_vocabulary_filters": [], "hide_assignee_team_selection": true, "user_can_unassign": false, "user_can_delete": false, "delete_link": "https://bugs.launchpad.net/beautifulsoup/+bug/2076897/+delete", "target_is_product": true, "status_widget_items": [{"name": "Fix Committed", "value": "Fix Committed", "description": "Fixed, but not available until next release.\n", "description_css_class": "choice-description", "style": "", "help": "", "disabled": false, "css_class": "statusFIXCOMMITTED"}], "status_value": "Fix Committed", "importance_widget_items": "[]", "importance_value": "Undecided", "milestone_widget_items": "[]", "milestone_value": null, "user_can_edit_assignee": false, "user_can_edit_milestone": false, "user_can_edit_status": false, "user_can_edit_importance": false}, "3244768": {"id": 3244768, "row_id": "tasksummary3244768", "form_row_id": "task3244768", "bugtask_path": "/debian/+source/beautifulsoup4/+bug/2076897", "prefix": "debian_beautifulsoup4", "targetname": "beautifulsoup4 (Debian)", "bug_title": "lxml 5.3.0 DeprecationWarning", "assignee_value": null, "assignee_is_team": null, "assignee_vocabulary": "AllUserTeamsParticipation", "assignee_vocabulary_filters": [], "hide_assignee_team_selection": true, "user_can_unassign": false, "user_can_delete": false, "delete_link": "https://bugs.launchpad.net/debian/+source/beautifulsoup4/+bug/2076897/+delete", "target_is_product": false, "status_widget_items": [{"name": "Fix Released", "value": "Fix Released", "description": "The fix was released.\n", "description_css_class": "choice-description", "style": "", "help": "", "disabled": false, "css_class": "statusFIXRELEASED"}], "status_value": "Fix Released", "importance_widget_items": "[]", "importance_value": "Unknown", "milestone_widget_items": "[]", "milestone_value": null, "user_can_edit_assignee": false, "user_can_edit_milestone": false, "user_can_edit_status": false, "user_can_edit_importance": false}}, "information_type_data": {"PUBLIC": {"value": "PUBLIC", "description": "Everyone can see this information.\n", "name": "Public", "order": 0, "is_private": false, "description_css_class": "choice-description"}, "PUBLICSECURITY": {"value": "PUBLICSECURITY", "description": "Everyone can see this security related information.\n", "name": "Public Security", "order": 1, "is_private": false, "description_css_class": "choice-description"}, "PRIVATESECURITY": {"value": "PRIVATESECURITY", "description": "Only the security group can see this information.\n ", "name": "Private Security", "order": 2, "is_private": true, "description_css_class": "choice-description"}, "USERDATA": {"value": "USERDATA", "description": "Only shared with users permitted to see private user information.\n", "name": "Private", "order": 3, "is_private": true, "description_css_class": "choice-description"}}, "bug_is_private": false, "context": {"self_link": "https://bugs.launchpad.net/api/devel/beautifulsoup/+bug/2076897", "web_link": "https://bugs.launchpad.net/beautifulsoup/+bug/2076897", "resource_type_link": "https://bugs.launchpad.net/api/devel/#bug_task", "bug_link": "https://bugs.launchpad.net/api/devel/bugs/2076897", "milestone_link": null, "status": "Fix Committed", "status_explanation": null, "importance": "Undecided", "importance_explanation": null, "assignee_link": null, "bug_target_display_name": "Beautiful Soup", "bug_target_name": "beautifulsoup", "bug_watch_link": null, "date_assigned": null, "date_created": "2024-08-13T09:53:01.343777+00:00", "date_confirmed": "2024-08-22T00:26:45.940911+00:00", "date_incomplete": null, "date_in_progress": "2024-08-22T00:26:45.940911+00:00", "date_closed": null, "date_left_new": "2024-08-22T00:26:45.940911+00:00", "date_triaged": "2024-08-22T00:26:45.940911+00:00", "date_fix_committed": "2024-08-22T00:26:45.940911+00:00", "date_fix_released": null, "date_left_closed": null, "owner_link": "https://bugs.launchpad.net/api/devel/~frenzy-madness", "target_link": "https://bugs.launchpad.net/api/devel/beautifulsoup", "title": "Bug #2076897 in Beautiful Soup: \"lxml 5.3.0 DeprecationWarning\"", "related_tasks_collection_link": "https://bugs.launchpad.net/api/devel/beautifulsoup/+bug/2076897/related_tasks", "is_complete": false, "http_etag": "\"9cd88dc59d96d3e1f003e9fa0902ec9d6547f89d-1757c6b8d359ceb6145415e280119b426b48b72d\""}};</script> </body> <!-- Facet name: bugs Page type: main_side Has global search: True Has application tabs: True Has side portlets: True At least 72 queries/external actions issued in 0.83 seconds Features: {'profiling.enabled': None, 'hard_timeout': '9000', 'app.mainsite_only.canonical_url': None, 'js.yui_version': None, 'app.maintenance_message': None, 'bugs.affected_count_includes_dupes.disabled': None, 'baselayout.careers_link.disabled': None, 'visible_render_time': None} r22ade00 --> </html>

Pages: 1 2 3 4 5 6 7 8 9 10