Bug 1793485 - tuned fails to build with Python 3.9: pyudev imports abc from collections
Summary: tuned fails to build with Python 3.9: pyudev imports abc from collections
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: tuned
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jaroslav Škarvada
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1772058
Blocks: PYTHON39
TreeView+ depends on / blocked
 
Reported: 2020-01-21 13:14 UTC by Miro Hrončok
Modified: 2020-02-06 08:15 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-02-06 08:15:03 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Miro Hrončok 2020-01-21 13:14:32 UTC
tuned fails to build with Python 3.9.0a2.

ImportError: Failed to import test module: plugins.test_base
Traceback (most recent call last):
  File "/usr/lib64/python3.9/unittest/loader.py", line 436, in _find_test_path
    module = self._get_module_from_name(name)
  File "/usr/lib64/python3.9/unittest/loader.py", line 377, in _get_module_from_name
    __import__(name)
  File "/builddir/build/BUILD/tuned-2.13.0/tests/unit/plugins/test_base.py", line 11, in <module>
    import tuned.hardware as hardware
  File "/builddir/build/BUILD/tuned-2.13.0/tuned/hardware/__init__.py", line 1, in <module>
    from .inventory import *
  File "/builddir/build/BUILD/tuned-2.13.0/tuned/hardware/inventory.py", line 1, in <module>
    import pyudev
  File "/usr/lib/python3.9/site-packages/pyudev/__init__.py", line 43, in <module>
    from pyudev.device import Attributes
  File "/usr/lib/python3.9/site-packages/pyudev/device/__init__.py", line 28, in <module>
    from ._device import Attributes
  File "/usr/lib/python3.9/site-packages/pyudev/device/_device.py", line 35, in <module>
    from collections import Container
ImportError: cannot import name 'Container' from 'collections' (/usr/lib64/python3.9/collections/__init__.py)

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

"The abstract base classes in collections.abc no longer are exposed in the regular collections module. This will help create a clearer distinction between the concrete classes and the abstract base classes."


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

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

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 mulhern 2020-01-21 14:00:00 UTC
The fix has been committed to the pyudev development branch: https://github.com/pyudev/pyudev/pull/386. Under the circumtances, probably the best thing to do is to cut a new pyudev release within the week. Then, the corresponding package can be released on Fedora, and all should be well again.

Comment 2 Ondřej Lysoněk 2020-01-29 12:58:15 UTC
Hi! Why was this switched to the Tuned component? I don't see anything that needs doing in Tuned - AFAICS, Tuned only uses collections.OrderedDict and collections.abc.Mapping, both of which continue to be available.

Thanks.

Comment 3 Miro Hrončok 2020-01-29 13:00:40 UTC
This is set to depend on bz1772058 and used to track Python 3.9 failure - tuned fails to build, but it's not tuned's fault.

Comment 4 Ondřej Lysoněk 2020-01-29 13:05:05 UTC
Oh, I see. Thanks.


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