Switch from cElementTree to ElementTree.

The xml.etree.cElementTree module will be removed in Python 3.9. Since
Python 3.3 the xml.etree.cElementTree module has been deprecated, the
xml.etree.ElementTree module uses a fast implementation whenever
available.

Builds using Python 2.7 can still work but with the slower
implementation.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Acked-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5349>
This commit is contained in:
Vinson Lee 2020-06-05 00:46:10 -07:00
parent a61532e4db
commit faa339e666
11 changed files with 11 additions and 11 deletions

View file

@ -26,7 +26,7 @@ import argparse
import functools
import math
import os
import xml.etree.cElementTree as et
import xml.etree.ElementTree as et
from collections import OrderedDict, namedtuple
from mako.template import Template

View file

@ -27,7 +27,7 @@ import copy
import functools
import math
import os
import xml.etree.cElementTree as et
import xml.etree.ElementTree as et
from collections import OrderedDict, namedtuple
from mako.template import Template

View file

@ -28,7 +28,7 @@ from collections import OrderedDict
import os
import pathlib
import re
import xml.etree.cElementTree as et
import xml.etree.ElementTree as et
def get_filename(element):
return element.attrib['filename']

View file

@ -25,7 +25,7 @@
from __future__ import print_function
import sys
import zlib
import xml.etree.cElementTree as et
import xml.etree.ElementTree as et
def main():
if len(sys.argv) < 2:

View file

@ -24,7 +24,7 @@ import os
import sys
import textwrap
import xml.etree.cElementTree as et
import xml.etree.ElementTree as et
hashed_funcs = {}

View file

@ -25,7 +25,7 @@
import argparse
import math
import os
import xml.etree.cElementTree as et
import xml.etree.ElementTree as et
from collections import OrderedDict, namedtuple
from mako.template import Template

View file

@ -28,7 +28,7 @@
import collections
import re
import sys
import xml.etree.cElementTree as etree
import xml.etree.ElementTree as etree
import os
GLAPI = os.path.join(os.path.dirname(__file__), "..", "glapi", "gen")

View file

@ -33,7 +33,7 @@ Generates the glapi_mapi_tmp.h header file from Khronos's XML file.
"""
import sys
import xml.etree.cElementTree as etree
import xml.etree.ElementTree as etree
import genCommon

View file

@ -25,7 +25,7 @@ from __future__ import print_function
import argparse
import os
import textwrap
import xml.etree.cElementTree as et
import xml.etree.ElementTree as et
from mako.template import Template

View file

@ -1,7 +1,7 @@
import argparse
import copy
import re
import xml.etree.cElementTree as et
import xml.etree.ElementTree as et
def _bool_to_c_expr(b):
if b is True:

View file

@ -24,7 +24,7 @@ COPYRIGHT = """\
*/
"""
import xml.etree.cElementTree as et
import xml.etree.ElementTree as et
from mako.template import Template