Re: [igt-dev] [PATCH i-g-t] python: Stop using cElementTree

Petri Latvala
2020-06-03T08:37:11Z

On Wed, Jun 03, 2020 at 11:15:32AM +0300, Arkadiusz Hiler wrote:
> It got removed in Python 3.9 and ever since Python 3.3 it's:
> from xml.etree.ElementTree import *
>
> Link: https://docs.python.org/3.9/whatsnew/3.9.html#removed
> Issue: https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/issues/86#note_520308
>
> Cc: Petri Latvala <petri.latvala@intel.com>
> Cc: Lionel Landwerlin <lionel.g.landwerlin@linux.intel.com>
> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>

Reviewed-by: Petri Latvala <petri.latvala@intel.com>

> ---
> docs/reference/igt-gpu-tools/generate_description_xml.py | 2 +-
> lib/i915/perf-configs/codegen.py | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/docs/reference/igt-gpu-tools/generate_description_xml.py b/docs/reference/igt-gpu-tools/generate_description_xml.py
> index 8bb0989a..714590f8 100755
> --- a/docs/reference/igt-gpu-tools/generate_description_xml.py
> +++ b/docs/reference/igt-gpu-tools/generate_description_xml.py
> @@ -4,7 +4,7 @@ import re
> import sys
> import os.path
> import subprocess
> -import xml.etree.cElementTree as ET
> +import xml.etree.ElementTree as ET
>
> from collections import namedtuple
>
> diff --git a/lib/i915/perf-configs/codegen.py b/lib/i915/perf-configs/codegen.py
> index 88981d73..5f028c22 100644
> --- a/lib/i915/perf-configs/codegen.py
> +++ b/lib/i915/perf-configs/codegen.py
> @@ -1,4 +1,4 @@
> -import xml.etree.cElementTree as et
> +import xml.etree.ElementTree as et
>
> class Codegen:
>
> --
> 2.25.4