iterparse: ignore strip_cdata with HTML#450
Merged
scoder merged 1 commit intolxml:masterfrom Feb 3, 2025
Merged
Conversation
Commit b79424c deprecated the strip_cdata argument to the HTML parser, causing all uses of iterparse() to trigger its DeprecationWarning (due to the default True value). Remove the strip_cdata argument from the HTML parser's arguments, and document it as ignored in iterparse() except for XML documents.
Member
|
Thanks. I'll release a 5.3.1 soon that should include this fix. |
scoder
pushed a commit
that referenced
this pull request
Feb 3, 2025
Commit b79424c deprecated the strip_cdata argument to the HTML parser, causing all uses of iterparse() to trigger its DeprecationWarning (due to the default True value). Remove the strip_cdata argument from the HTML parser's arguments, and document it as ignored in iterparse() except for XML documents. See https://bugs.launchpad.net/lxml/+bug/2067707
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Commit b79424c deprecated the
strip_cdataargument to the HTML parser, causing all uses ofiterparse()to trigger itsDeprecationWarning(due to the defaultTruevalue). Remove thestrip_cdataargument from the HTML parser's arguments, and document it as ignored initerparse()except for XML documents.Tests are added to
test_htmlparser.py, I've verified that they fail on themasterbranch without this change, but pass on the PR branch.See also: https://bugs.launchpad.net/lxml/+bug/2067707