Issue #26676: Add missing XMLPullParser to ElementTree.__all__
authorMartin Panter <vadmium+py@gmail.com>
Fri, 1 Apr 2016 06:55:55 +0000 (06:55 +0000)
committerMartin Panter <vadmium+py@gmail.com>
Fri, 1 Apr 2016 06:55:55 +0000 (06:55 +0000)
Doc/whatsnew/3.6.rst
Lib/test/test_xml_etree.py
Lib/xml/etree/ElementTree.py
Misc/NEWS

index 928d7486ad646e0984669510feea5ee9b6c1b69e..6799f69fc0c36f66e4f2343cc8f4ac56420cdf71 100644 (file)
@@ -460,7 +460,8 @@ Changes in the Python API
 
 * 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`.
index bfd72153795f5274ebeed41dda053516f75a770e..a56f1582b65dcecb485d0e229278afd06d935be8 100644 (file)
@@ -91,8 +91,6 @@ ENTITY_XML = """\
 
 
 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 @@ class ModuleTest(unittest.TestCase):
         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':
index b92fb52124a1d66b59ae9864733005f561cd3f07..50e42c85e45f254bab78e26fe8152bcc010fdd24 100644 (file)
@@ -85,7 +85,7 @@ __all__ = [
     "TreeBuilder",
     "VERSION",
     "XML", "XMLID",
-    "XMLParser",
+    "XMLParser", "XMLPullParser",
     "register_namespace",
     ]
 
index 64977018f66f316766ff26c29e2ff1bf9dbb0550..8a7fac4ebdbd0aa6738cd96b1d8e7d823e79af88 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -237,6 +237,8 @@ Core and Builtins
 Library
 -------
 
+- Issue #26676: Added missing XMLPullParser to ElementTree.__all__.
+
 - Issue #22854: Change BufferedReader.writable() and
   BufferedWriter.readable() to always return False.