From ceee9911ca1cc8b1e67efeea6ed74564f4820c3f Mon Sep 17 00:00:00 2001 From: Leonard Richardson Date: Wed, 17 Jan 2024 10:56:15 -0500 Subject: Added the correct stacklevel to instances of the XMLParsedAsHTMLWarning. [bug=2034451] --- CHANGELOG | 5 ++++- bs4/builder/__init__.py | 13 +++++++++---- bs4/builder/_html5lib.py | 4 +++- bs4/builder/_lxml.py | 4 +++- 4 files changed, 19 insertions(+), 7 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 3dde767..910bea6 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -7,12 +7,15 @@ * Fixed a regression such that if you set .hidden on a tag, the tag becomes invisible but its contents are still visible. User manipulation of .hidden is not a documented or supported feature, so don't do this, - but it's not too difficult to keep the old behavior working. + but it wasn't too difficult to keep the old behavior working. * Fixed a case found by Mengyuhan where html.parser giving up on markup would result in an AssertionError instead of a ParserRejectedMarkup exception. +* Added the correct stacklevel to instances of the XMLParsedAsHTMLWarning. + [bug=2034451] + * Corrected the syntax of the license definition in pyproject.toml. Patch by Louis Maddox. [bug=2032848] diff --git a/bs4/builder/__init__.py b/bs4/builder/__init__.py index 2e39745..ffb31fc 100644 --- a/bs4/builder/__init__.py +++ b/bs4/builder/__init__.py @@ -514,15 +514,19 @@ class DetectsXMLParsedAsHTML(object): XML_PREFIX_B = b'