diff options
author | Leonard Richardson <leonardr@segfault.org> | 2023-01-27 12:45:14 -0500 |
---|---|---|
committer | Leonard Richardson <leonardr@segfault.org> | 2023-01-27 12:45:14 -0500 |
commit | 98756d3c97f553f7abf22e3e16a357dac60f0b02 (patch) | |
tree | a30d5bdc90e4639053b037cd1b6a8e8d81deb63e /bs4/builder/_htmlparser.py | |
parent | 12ad184120ad7ddebe63462daf3c6f1a64fb4338 (diff) |
Warnings now do their best to provide an appropriate stacklevel,
improving the usefulness of the message. [bug=1978744]
Diffstat (limited to 'bs4/builder/_htmlparser.py')
-rw-r--r-- | bs4/builder/_htmlparser.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bs4/builder/_htmlparser.py b/bs4/builder/_htmlparser.py index fae4d0f..52cebe6 100644 --- a/bs4/builder/_htmlparser.py +++ b/bs4/builder/_htmlparser.py @@ -95,12 +95,12 @@ class BeautifulSoupHTMLParser(HTMLParser, DetectsXMLParsedAsHTML): """In Python 3, HTMLParser subclasses must implement error(), although this requirement doesn't appear to be documented. - In Python 2, HTMLParser implements error() by raising an exception, - which we don't want to do. - In any event, this method is called only on very strange markup and our best strategy is to pretend it didn't happen and keep going. + + NOTE: this was deprecated in Python 3.4, and removed in 3.5. + Since Beautiful Soup support starts at 3.6, this can be removed. """ warnings.warn(msg) |