bpo-31844: Remove _markupbase.ParserBase.error()#8562
bpo-31844: Remove _markupbase.ParserBase.error()#8562berkerpeksag merged 2 commits intopython:masterfrom
Conversation
ezio-melotti
left a comment
There was a problem hiding this comment.
There are still calls to self.error() in the code that should be removed too before removing the error method.
|
When you're done making the requested changes, leave the comment: |
bf561c3 to
2b4ac00
Compare
|
I have made the requested changes; please review again. @ezio-melotti I kept exceptions, but let me know if you want me to replace them with |
|
Thanks for making the requested changes! @ezio-melotti: please review the changes made to this pull request. |
|
|
… through Python 3.9. Removing it generated: metabot/util/html.py:13:0: W0223: Method 'error' is abstract in class 'ParserBase' but is not overridden in child class '_HTMLSanitizer' (abstract-method) (as well as a potential problem if any error conditions in _markupbase.ParserBase actually triggered). However, it was removed entirely in 3.10 (see python/cpython#8562). Leaving it in generates: metabot/util/html.py:72:4: C0116: Missing function or method docstring (missing-function-docstring) (see https://github.com/nmlorg/metabot/actions/runs/5492368318/jobs/10009796391).
In python versions <py3.10 there is an issue with an undocumented method HTMLParser.error() [1][2] that was deprecated in Python 3.4 and removed in Python 3.5. To be compatible to higher versions (>=py3.10) an error method is implemented which throws an AssertionError exception like the higher Python versions do [3]. [1] python/cpython#76025 [2] https://bugs.python.org/issue31844 [3] python/cpython#8562 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
In python versions <py3.10 there is an issue with an undocumented method HTMLParser.error() [1][2] that was deprecated in Python 3.4 and removed in Python 3.5. To be compatible to higher versions (>=py3.10) an error method is implemented which throws an AssertionError exception like the higher Python versions do [3]. [1] python/cpython#76025 [2] https://bugs.python.org/issue31844 [3] python/cpython#8562 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
In python versions <py3.10 there is an issue with an undocumented method HTMLParser.error() [1][2] that was deprecated in Python 3.4 and removed in Python 3.5. To be compatible to higher versions (>=py3.10) an error method is implemented which throws an AssertionError exception like the higher Python versions do [3]. [1] python/cpython#76025 [2] https://bugs.python.org/issue31844 [3] python/cpython#8562 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
https://bugs.python.org/issue31844