gobject-introspection fails to build with Python 3.9.0a2. Traceback (most recent call last): File "/builddir/build/BUILD/gobject-introspection-1.62.0/x86_64-redhat-linux-gnu/tools/g-ir-scanner", line 100, in <module> sys.exit(scanner_main(sys.argv)) File "/builddir/build/BUILD/gobject-introspection-1.62.0/x86_64-redhat-linux-gnu/giscanner/scannermain.py", line 615, in scanner_main write_output(data, options) File "/builddir/build/BUILD/gobject-introspection-1.62.0/x86_64-redhat-linux-gnu/giscanner/scannermain.py", line 469, in write_output passthrough_gir(main_f_name, temp_f) File "/builddir/build/BUILD/gobject-introspection-1.62.0/x86_64-redhat-linux-gnu/giscanner/scannermain.py", line 260, in passthrough_gir parser.parse(path) File "/builddir/build/BUILD/gobject-introspection-1.62.0/x86_64-redhat-linux-gnu/giscanner/girparser.py", line 60, in parse self.parse_tree(tree) File "/builddir/build/BUILD/gobject-introspection-1.62.0/x86_64-redhat-linux-gnu/giscanner/girparser.py", line 69, in parse_tree self._parse_api(tree.getroot()) File "/builddir/build/BUILD/gobject-introspection-1.62.0/x86_64-redhat-linux-gnu/giscanner/girparser.py", line 106, in _parse_api for node in root.getchildren(): AttributeError: 'xml.etree.ElementTree.Element' object has no attribute 'getchildren' Indeed, getchildren() was deprecated since Python 3.2: Use "for node in root" instead. For the build logs, see: https://copr-be.cloud.fedoraproject.org/results/@python/python3.9/fedora-rawhide-x86_64/01139159-gobject-introspection/ For all our attempts to build gobject-introspection with Python 3.9, see: https://copr.fedorainfracloud.org/coprs/g/python/python3.9/package/gobject-introspection/ Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.9: https://copr.fedorainfracloud.org/coprs/g/python/python3.9/ Let us know here if you have any questions. Python 3.9 will be included in Fedora 33, but the initial bootstrapping has already started. A build failure this early in the bootstrap sequence blocks us very much.
Adding this to prep makes the package build: # Python 3.9 compatibility # https://gitlab.gnome.org/GNOME/gobject-introspection/issues/325 # https://bugzilla.redhat.com/show_bug.cgi?id=1788092 sed -i 's/.getchildren()//' giscanner/girparser.py
Proposed the fix upstream.
The upstream fix is included in Fedora now, thanks Kalev.
Great :) Thanks, Miro!