-
-
Notifications
You must be signed in to change notification settings - Fork 31.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bpo-31844: Remove _markupbase.ParserBase.error() #8562
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
|
… 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