From: Stephen F. <st...@th...> - 2019-08-25 15:57:10
|
PyXML is dead and doesn't support any of the Python versions we use. No need to keep worrying about it screwing with stdlib's XML libraries. Signed-off-by: Stephen Finucane <st...@th...ru> --- docutils/docutils/writers/docutils_xml.py | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/docutils/docutils/writers/docutils_xml.py b/docutils/docutils/writers/docutils_xml.py index fd25a024f..d753d255b 100644 --- a/docutils/docutils/writers/docutils_xml.py +++ b/docutils/docutils/writers/docutils_xml.py @@ -11,19 +11,6 @@ http://docutils.sourceforge.net/docs/ref/docutils.dtd. __docformat__ = 'reStructuredText' import sys - -# Work around broken PyXML and obsolete python stdlib behaviour. (The stdlib -# replaces its own xml module with PyXML if the latter is installed. However, -# PyXML is no longer maintained and partially incompatible/buggy.) Reverse -# the order in which xml module and submodules are searched to import stdlib -# modules if they exist and PyXML modules if they do not exist in the stdlib. -# -# See http://sourceforge.net/tracker/index.php?func=detail&aid=3552403&group_id=38414&atid=422030 -# and http://lists.fedoraproject.org/pipermail/python-devel/2012-July/000406.html -import xml -if "_xmlplus" in xml.__path__[0]: # PyXML sub-module - xml.__path__.reverse() # If both are available, prefer stdlib over PyXML - import xml.sax.saxutils from StringIO import StringIO -- 2.21.0 |