diff options
author | Björn Esser <besser82@fedoraproject.org> | 2020-06-04 20:48:51 +0200 |
---|---|---|
committer | Björn Esser <besser82@fedoraproject.org> | 2020-06-04 21:08:08 +0200 |
commit | 029d5b5d705a27a9bb16fb7fb9b0d2b03dab424a (patch) | |
tree | 6fecee805ae9d6833988b21578cb71665d0ea474 | |
parent | 7d58eed95f796fc764741d7549ee2214bbbcc64c (diff) | |
download | xcb-proto-029d5b5d705a27a9bb16fb7fb9b0d2b03dab424a.tar.gz |
xcbgen: Use xml.etree.ElementTree for Python >= 3.3.
In commit 7d58eed95f796fc764741d7549ee2214bbbcc64c we started
to use xml.etree.ElementTree for Python >= 3.9. In fact the
xml.etree.cElementTree module has already been deprecated
since Python 3.3.
Given this fact, we should start to use the xml.etree.ElementTree
module beginning with Python 3.3.
See: https://github.com/python/cpython/commit/a72a98f24a19928e31dcc4cab2cd2ad0f1846e11
Signed-off-by: Björn Esser <besser82@fedoraproject.org>
-rw-r--r-- | xcbgen/matcher.py | 2 | ||||
-rw-r--r-- | xcbgen/state.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/xcbgen/matcher.py b/xcbgen/matcher.py index a13ef28..0d57685 100644 --- a/xcbgen/matcher.py +++ b/xcbgen/matcher.py @@ -9,7 +9,7 @@ we do not create a new type object, we just record the existing one under a new from os.path import join from sys import version_info -if version_info[:2] >= (3, 9): +if version_info[:2] >= (3, 3): from xml.etree.ElementTree import parse else: from xml.etree.cElementTree import parse diff --git a/xcbgen/state.py b/xcbgen/state.py index 3b7eeb4..ffbfc14 100644 --- a/xcbgen/state.py +++ b/xcbgen/state.py @@ -4,7 +4,7 @@ This module contains the namespace class and the singleton module class. from os.path import dirname, basename from sys import version_info -if version_info[:2] >= (3, 9): +if version_info[:2] >= (3, 3): from xml.etree.ElementTree import parse else: from xml.etree.cElementTree import parse |