[issue19176] DeprecationWarning for doctype() method when subclassing _elementtree.XMLParser

Martin Panter report at bugs.python.org
Wed Dec 17 02:48:57 CET 2014


Martin Panter added the comment:

Since the doctype() method doesn’t appear to be removed from the “default” (3.5?) branch either, here is a patch that avoids the deprecation warning when inheriting method + a test.

Hopefully this will be useful when you get some time to look at it. I’m not sure if the PyCFunction_ calls are a good idea; they don’t seem to be documented, but I couldn’t think of a better way to check if the method was overridden.

----------
keywords: +patch
versions: +Python 3.5
Added file: http://bugs.python.org/file37476/inherit-doctype.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19176>
_______________________________________


More information about the Python-bugs-list mailing list