[Python-checkins] cpython: Issue #26676: Add missing XMLPullParser to ElementTree.__all__

martin.panter python-checkins at python.org
Fri Apr 1 03:26:23 EDT 2016


https://hg.python.org/cpython/rev/3d6b67361749
changeset: 100820:3d6b67361749
user: Martin Panter <vadmium+py at gmail.com>
date: Fri Apr 01 06:55:55 2016 +0000
summary:
 Issue #26676: Add missing XMLPullParser to ElementTree.__all__
files:
 Doc/whatsnew/3.6.rst | 3 ++-
 Lib/test/test_xml_etree.py | 6 ++++--
 Lib/xml/etree/ElementTree.py | 2 +-
 Misc/NEWS | 2 ++
 4 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/Doc/whatsnew/3.6.rst b/Doc/whatsnew/3.6.rst
--- a/Doc/whatsnew/3.6.rst
+++ b/Doc/whatsnew/3.6.rst
@@ -460,7 +460,8 @@
 
 * The following modules have had missing APIs added to their :attr:`__all__`
 attributes to match the documented APIs: :mod:`calendar`, :mod:`csv`,
- :mod:`enum`, :mod:`fileinput`, :mod:`ftplib`, :mod:`logging`,
+ :mod:`~xml.etree.ElementTree`, :mod:`enum`,
+ :mod:`fileinput`, :mod:`ftplib`, :mod:`logging`,
 :mod:`optparse`, :mod:`tarfile`, :mod:`threading` and
 :mod:`wave`. This means they will export new symbols when ``import *``
 is used. See :issue:`23883`.
diff --git a/Lib/test/test_xml_etree.py b/Lib/test/test_xml_etree.py
--- a/Lib/test/test_xml_etree.py
+++ b/Lib/test/test_xml_etree.py
@@ -91,8 +91,6 @@
 
 
 class ModuleTest(unittest.TestCase):
- # TODO: this should be removed once we get rid of the global module vars
-
 def test_sanity(self):
 # Import sanity.
 
@@ -100,6 +98,10 @@
 from xml.etree import ElementInclude
 from xml.etree import ElementPath
 
+ def test_all(self):
+ names = ("xml.etree.ElementTree", "_elementtree")
+ support.check__all__(self, ET, names, blacklist=("HTML_EMPTY",))
+
 
 def serialize(elem, to_string=True, encoding='unicode', **options):
 if encoding != 'unicode':
diff --git a/Lib/xml/etree/ElementTree.py b/Lib/xml/etree/ElementTree.py
--- a/Lib/xml/etree/ElementTree.py
+++ b/Lib/xml/etree/ElementTree.py
@@ -85,7 +85,7 @@
 "TreeBuilder",
 "VERSION",
 "XML", "XMLID",
- "XMLParser",
+ "XMLParser", "XMLPullParser",
 "register_namespace",
 ]
 
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -237,6 +237,8 @@
 Library
 -------
 
+- Issue #26676: Added missing XMLPullParser to ElementTree.__all__.
+
 - Issue #22854: Change BufferedReader.writable() and
 BufferedWriter.readable() to always return False.
 
-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /