From c0b81a92f1af50ad598f1e2d02d9fc62c2f2cabb Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Sun, 22 Mar 2020 11:00:05 +0200 Subject: [PATCH 1/2] bpo-36543: Remove the xml.etree.cElementTree module. --- Lib/xml/etree/cElementTree.py | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 Lib/xml/etree/cElementTree.py diff --git a/Lib/xml/etree/cElementTree.py b/Lib/xml/etree/cElementTree.py deleted file mode 100644 index 368e6791895829..00000000000000 --- a/Lib/xml/etree/cElementTree.py +++ /dev/null @@ -1,3 +0,0 @@ -# Deprecated alias for xml.etree.ElementTree - -from xml.etree.ElementTree import * From 18f2d5f5a88f675e7331d3490318931048a0b7e1 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Sun, 22 Mar 2020 13:15:45 +0200 Subject: [PATCH 2/2] Fix tests. --- Lib/test/test_xml_etree_c.py | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/Lib/test/test_xml_etree_c.py b/Lib/test/test_xml_etree_c.py index 2144d203e1e95c..15496fdba2ff86 100644 --- a/Lib/test/test_xml_etree_c.py +++ b/Lib/test/test_xml_etree_c.py @@ -8,9 +8,6 @@ cET = import_fresh_module('xml.etree.ElementTree', fresh=['_elementtree']) -cET_alias = import_fresh_module('xml.etree.cElementTree', - fresh=['_elementtree', 'xml.etree'], - deprecated=True) @unittest.skipUnless(cET, 'requires _elementtree') @@ -155,14 +152,6 @@ def test_xmlpullparser_leaks(self): support.gc_collect() -@unittest.skipUnless(cET, 'requires _elementtree') -class TestAliasWorking(unittest.TestCase): - # Test that the cET alias module is alive - def test_alias_working(self): - e = cET_alias.Element('foo') - self.assertEqual(e.tag, 'foo') - - @unittest.skipUnless(cET, 'requires _elementtree') @support.cpython_only class TestAcceleratorImported(unittest.TestCase): @@ -171,9 +160,6 @@ def test_correct_import_cET(self): # SubElement is a function so it retains _elementtree as its module. self.assertEqual(cET.SubElement.__module__, '_elementtree') - def test_correct_import_cET_alias(self): - self.assertEqual(cET_alias.SubElement.__module__, '_elementtree') - def test_parser_comes_from_C(self): # The type of methods defined in Python code is types.FunctionType, # while the type of methods defined inside _elementtree is @@ -213,7 +199,6 @@ def test_main(): # Run the tests specific to the C implementation support.run_unittest( MiscTests, - TestAliasWorking, TestAcceleratorImported, SizeofTest, )