summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeonard Richardson <leonardr@segfault.org>2024-02-12 16:29:18 -0500
committerLeonard Richardson <leonardr@segfault.org>2024-02-12 16:29:18 -0500
commit7fb51753743644e23dfb3e7a964d387583dd0bc0 (patch)
treecfb1c29054ee6245b77dfaf708dca89d0af13197
parent496f064d7ceeec44a4d65e0e838667364ef1e3db (diff)
Applied patch from Marc Müller to add a stacklevel to a warning that was missing it.
-rw-r--r--bs4/builder/__init__.py2
1 files changed, 1 insertions, 1 deletions
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):