Skip to content

git head causes AttributeError with python 3.9

Fedora 33 (to be released in 2020/Nov) uses python 3.9 (currently RC2), and python 3.9 removes getiterator() of classes ElementTree as written on : https://docs.python.org/3.9/whatsnew/3.9.html#removed . As a result, 4ea0195e cannot be lauched with python3.9 like:

[tasaka1@localhost catfish]$ PYTHONPATH=$(pwd)/catfish:$(pwd)/catfish_lib:$(pwd) python3 ./bin/catfish 
Traceback (most recent call last):
  File "/home/tasaka1/rpmbuild/fedora-specific/catfish/master/GIT/catfish/./bin/catfish", line 44, in <module>
    catfish.main()
  File "/home/tasaka1/rpmbuild/fedora-specific/catfish/master/GIT/catfish/catfish/__init__.py", line 78, in main
    window = CatfishWindow.CatfishWindow()
  File "/home/tasaka1/rpmbuild/fedora-specific/catfish/master/GIT/catfish/catfish_lib/Window.py", line 173, in __new__
    builder = get_builder(__builder__['ui_file'])
  File "/home/tasaka1/rpmbuild/fedora-specific/catfish/master/GIT/catfish/catfish_lib/helpers.py", line 95, in get_builder
    builder.add_from_file(ui_filename)
  File "/home/tasaka1/rpmbuild/fedora-specific/catfish/master/GIT/catfish/catfish_lib/Builder.py", line 87, in add_from_file
    ele_widgets = tree.getiterator("object")
AttributeError: 'ElementTree' object has no attribute 'getiterator'

The attached patch should fix this issue.0001-Support-python-3.9-and-drop-support-python-3.2.patch

Edited by Mamoru TASAKA