From 5d05bcbe14d5d5c431b429f2080966d90de5214d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Beraud?= Date: Tue, 23 Jun 2020 11:26:20 +0200 Subject: [PATCH] Remove elementtree deprecated methods All our supported runtimes [1] are compatible with the recommended alternatives. `Element.getiterator` [2] is deprecated since python 3.2 and will be removed in python 3.9, these changes switch usages to Element.iter() [3] [1] https://governance.openstack.org/tc/reference/runtimes/victoria.html#python-runtimes-for-train [2] https://docs.python.org/3/library/xml.etree.elementtree.html#xml.etree.ElementTree.Element.getiterator [3] https://docs.python.org/3/library/xml.etree.elementtree.html#xml.etree.ElementTree.Element.iter Change-Id: Iaf5291698d866c9c86cda0f255799d8f10fff3dd --- os_ken/tests/integrated/test_of_config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/os_ken/tests/integrated/test_of_config.py b/os_ken/tests/integrated/test_of_config.py index 70a4a342..e39d7c90 100644 --- a/os_ken/tests/integrated/test_of_config.py +++ b/os_ken/tests/integrated/test_of_config.py @@ -235,7 +235,7 @@ class OFConfigClient(app_manager.OSKenApp): self._validate(tree) name_spaces = set() - for e in tree.getiterator(): + for e in tree.iter(): name_spaces.add(capable_switch.get_ns_tag(e.tag)[0]) print(name_spaces)