From 7fb51753743644e23dfb3e7a964d387583dd0bc0 Mon Sep 17 00:00:00 2001 From: Leonard Richardson Date: Mon, 12 Feb 2024 16:29:18 -0500 Subject: =?UTF-8?q?Applied=20patch=20from=20Marc=20M=C3=BCller=20to=20add?= =?UTF-8?q?=20a=20stacklevel=20to=20a=20warning=20that=20was=20missing=20i?= =?UTF-8?q?t.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bs4/builder/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bs4/builder/__init__.py b/bs4/builder/__init__.py index ffb31fc..30d7ca1 100644 --- a/bs4/builder/__init__.py +++ b/bs4/builder/__init__.py @@ -588,7 +588,7 @@ class DetectsXMLParsedAsHTML(object): # We encountered an XML declaration and then a tag other # than 'html'. This is a reliable indicator that a # non-XHTML document is being parsed as XML. - self._warn() + self._warn(stacklevel=10) def register_treebuilders_from(module): -- cgit v1.2.3