Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1834209 - python-ase fails to build with Python 3.9: Element.getiterator() is gone
Summary: python-ase fails to build with Python 3.9: Element.getiterator() is gone
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-ase
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: marcindulak
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON39
TreeView+ depends on / blocked
 
Reported: 2020-05-11 10:24 UTC by Miro Hrončok
Modified: 2020-05-12 22:17 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-05-11 22:34:51 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Miro Hrončok 2020-05-11 10:24:07 UTC
python-ase fails to build with Python 3.9.0a6.

Failures and errors:
exciting/exciting.py: AttributeError: 'xml.etree.ElementTree.Element' object has no attribute 'getiterator'
========== Summary ==========
Number of tests   363
Passes:           252
Failures:           0
Errors:             1
Skipped:          110


See https://docs.python.org/3.9/whatsnew/3.9.html#removed

"Methods getchildren() and getiterator() in the ElementTree module have been removed. They were deprecated in Python 3.2. Use functions list() and iter() instead." 


For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.9/fedora-rawhide-x86_64/01372574-python-ase/

For all our attempts to build python-ase with Python 3.9, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.9/package/python-ase/

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. To make that update smoother, we're building Fedora packages with early pre-releases of Python 3.9.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires), so if this package is required a lot, it's important for us to get it fixed soon.
We'd appreciate help from the people who know this package best, but if you don't want to work on this now, let us know so we can try to work around it on our side.

Comment 1 marcindulak 2020-05-11 22:34:51 UTC
https://src.fedoraproject.org/rpms/python-ase/c/ce3d52f0080874c6dbc55abaf52f81750daa5c08?branch=master should fix it.

For some reasons the patch has not been included upstream https://gitlab.com/ase/ase/-/issues/580#note_338535048

Unfortunately I can't test this change with mock:

```
cat /etc/*release | grep PRETTY
PRETTY_NAME="Fedora 30 (Thirty)"

mock --version
2.1

sudo usermod -G mock vagrant  # logout/login

id | grep mock
uid=1000(vagrant) gid=1000(vagrant) groups=1000(vagrant),135(mock) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023

cat ~/.config/mock/fedora-rawhide-python39.cfg
include('/etc/mock/fedora-rawhide-x86_64.cfg')

config_opts['root'] = 'fedora-rawhide-python39'

config_opts[f'{config_opts.package_manager}.conf'] += """

[python39]
name=Copr repo for python3.9 owned by @python
baseurl=https://copr-be.cloud.fedoraproject.org/results/@python/python3.9/fedora-rawhide-$basearch/
type=rpm-md
skip_if_unavailable=False
gpgcheck=1
gpgkey=https://copr-be.cloud.fedoraproject.org/results/@python/python3.9/pubkey.gpg
repo_gpgcheck=0
enabled=1
enabled_metadata=1
cost=10
"""

mock -r fedora-rawhide-python39 --enablerepo=local /home/vagrant/rpmbuild/SRPMS/python-ase-3.19.1-2.fc30.src.rpm
```

```
grep error /var/lib/mock/fedora-rawhide-python39/result/root.log
DEBUG util.py:600:  error: cannot open Packages index using db5 - Permission denied (13)
DEBUG util.py:600:  error: cannot open Packages database in /var/lib/mock/fedora-rawhide-python39/root/var/lib/rpm
DEBUG util.py:600:  error: cannot open Packages index using db5 - Permission denied (13)
DEBUG util.py:600:  error: cannot open Packages database in /var/lib/mock/fedora-rawhide-python39/root/var/lib/rpm
```

Comment 2 Miro Hrončok 2020-05-11 23:26:27 UTC
Thanks. No idea about the mock problem, sorry.

Comment 3 marcindulak 2020-05-12 22:17:06 UTC
(In reply to Miro Hrončok from comment #2)
> Thanks. No idea about the mock problem, sorry.

Started a fedora 32 VM instead and the above mock error is not there anymore.


Note You need to log in before you can comment on or make changes to this bug.