Commit 04dd64cf authored by Mamoru TASAKA's avatar Mamoru TASAKA
Browse files

Support python 3.9 and drop support python < 3.2

python 3.9 removes getiterator() of classes ElementTree , which are
obsoleted from python 3.2:
https://docs.python.org/3.9/whatsnew/3.9.html#removed

Change getiterator() to iter() introduced in python 3.2, and because of
this, drop support python < 3.2.
parent 4ea0195e
......@@ -84,7 +84,7 @@ class Builder(Gtk.Builder):
tree = ElementTree()
tree.parse(filename)
ele_widgets = tree.getiterator("object")
ele_widgets = tree.iter("object")
for ele_widget in ele_widgets:
try:
name = ele_widget.attrib['id']
......@@ -109,7 +109,7 @@ class Builder(Gtk.Builder):
if connections:
self.connections.extend(connections)
ele_signals = tree.getiterator("signal")
ele_signals = tree.iter("signal")
for ele_signal in ele_signals:
self.glade_handler_dict.update(
{ele_signal.attrib["handler"]: None})
......
......@@ -35,9 +35,9 @@ assert DistUtilsExtra.auto.__version__ >= '2.18', \
'DistUtilsExtra.auto >= 2.18 required, found %s' \
% DistUtilsExtra.auto.__version__
python_version = float("%i.%i" % sys.version_info[:2])
assert python_version >= 3.0, \
'Python >= 3.0 required, found %s' % str(python_version)
python_version = float("%i.%02i" % sys.version_info[:2])
assert python_version >= 3.02, \
'Python >= 3.2 required, found %s' % str(python_version)
def update_config(libdir, values={}):
"""Update the configuration file at installation time."""
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment