Florent Xicluna <florent.xicl...@gmail.com> added the comment:

I understand the point about compatibility.
However it is slightly different here, because the method is already deprecated 
in Python 2.7 and 3.2, with a warning in the documentation and a 
DeprecationWarning at runtime.
This method was never available in the C version, and the documentation is 
clear about the recommended way of writing a custom doctype handler.
Arguably, it is not the most popular feature of ElementTree.

I am not opposed to adding the deprecated method in the C implementation, but 
it will need someone to do the patch, taking care of raising the deprecation 
warning correctly, and taking care of the case where XMLParser is subclassed. 
Is it worth the hassle?


Please not that contrary to what is stated in the first message (msg153328), 
the doctype() method is not defined on the default TreeBuilder (Python) class. 
The documentation suggests to add it on custom TreeBuilder implementations.

----------
priority: high -> normal

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue14007>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to