[issue19483] Pure-Python ElementTree classes no longer available since 3.3

Brecht Machiels report at bugs.python.org
Sun Nov 3 18:23:34 CET 2013


Brecht Machiels added the comment:

> You can import the pure python version in cPython by blocking the import > of the C accelerator:
>
>   import sys
>   sys.modules['_elementtree'] = None
>   import xml.etree.ElementTree

This will not work if xml.etree.ElementTree was already imported by another module, I think. Of course, you can take care of that case, but it doesn't get any prettier (I have done this for now).

Any objections to making the pure Python versions available under a different name?

----------

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


More information about the Python-bugs-list mailing list