Bug 1926075 - home-assistant-cli fails to build with Python 3.10: ImportError: cannot import name 'Iterable' from 'collections'
Summary: home-assistant-cli fails to build with Python 3.10: ImportError: cannot impor...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: home-assistant-cli
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Fabian Affolter
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1926090
Blocks: PYTHON3.10
TreeView+ depends on / blocked
 
Reported: 2021-02-08 07:33 UTC by Tomáš Hrnčiar
Modified: 2021-06-14 10:37 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-06-14 10:37:03 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Tomáš Hrnčiar 2021-02-08 07:33:27 UTC
home-assistant-cli fails to build with Python 3.10.0a5.

==================================== ERRORS ====================================
_____________________ ERROR collecting tests/test_area.py ______________________
ImportError while importing test module '/builddir/build/BUILD/home-assistant-cli-0.9.1/tests/test_area.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_area.py:8: in <module>
    import homeassistant_cli.cli as cli
homeassistant_cli/cli.py:14: in <module>
    from homeassistant_cli.helper import debug_requests_on, to_tuples
homeassistant_cli/helper.py:10: in <module>
    from tabulate import tabulate
/usr/lib/python3.10/site-packages/tabulate.py:16: in <module>
    from collections import Iterable
E   ImportError: cannot import name 'Iterable' from 'collections' (/usr/lib64/python3.10/collections/__init__.py)
__________________ ERROR collecting tests/test_completion.py ___________________
ImportError while importing test module '/builddir/build/BUILD/home-assistant-cli-0.9.1/tests/test_completion.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_completion.py:7: in <module>
    import homeassistant_cli.cli as cli
homeassistant_cli/cli.py:14: in <module>
    from homeassistant_cli.helper import debug_requests_on, to_tuples
homeassistant_cli/helper.py:10: in <module>
    from tabulate import tabulate
/usr/lib/python3.10/site-packages/tabulate.py:16: in <module>
    from collections import Iterable
E   ImportError: cannot import name 'Iterable' from 'collections' (/usr/lib64/python3.10/collections/__init__.py)
___________________ ERROR collecting tests/test_defaults.py ____________________
ImportError while importing test module '/builddir/build/BUILD/home-assistant-cli-0.9.1/tests/test_defaults.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_defaults.py:9: in <module>
    import homeassistant_cli.cli as cli
homeassistant_cli/cli.py:14: in <module>
    from homeassistant_cli.helper import debug_requests_on, to_tuples
homeassistant_cli/helper.py:10: in <module>
    from tabulate import tabulate
/usr/lib/python3.10/site-packages/tabulate.py:16: in <module>
    from collections import Iterable
E   ImportError: cannot import name 'Iterable' from 'collections' (/usr/lib64/python3.10/collections/__init__.py)
____________________ ERROR collecting tests/test_device.py _____________________
ImportError while importing test module '/builddir/build/BUILD/home-assistant-cli-0.9.1/tests/test_device.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_device.py:8: in <module>
    import homeassistant_cli.cli as cli
homeassistant_cli/cli.py:14: in <module>
    from homeassistant_cli.helper import debug_requests_on, to_tuples
homeassistant_cli/helper.py:10: in <module>
    from tabulate import tabulate
/usr/lib/python3.10/site-packages/tabulate.py:16: in <module>
    from collections import Iterable
E   ImportError: cannot import name 'Iterable' from 'collections' (/usr/lib64/python3.10/collections/__init__.py)
____________________ ERROR collecting tests/test_helper.py _____________________
ImportError while importing test module '/builddir/build/BUILD/home-assistant-cli-0.9.1/tests/test_helper.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_helper.py:4: in <module>
    import homeassistant_cli.helper as helper
homeassistant_cli/helper.py:10: in <module>
    from tabulate import tabulate
/usr/lib/python3.10/site-packages/tabulate.py:16: in <module>
    from collections import Iterable
E   ImportError: cannot import name 'Iterable' from 'collections' (/usr/lib64/python3.10/collections/__init__.py)
_____________________ ERROR collecting tests/test_info.py ______________________
ImportError while importing test module '/builddir/build/BUILD/home-assistant-cli-0.9.1/tests/test_info.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_info.py:8: in <module>
    import homeassistant_cli.cli as cli
homeassistant_cli/cli.py:14: in <module>
    from homeassistant_cli.helper import debug_requests_on, to_tuples
homeassistant_cli/helper.py:10: in <module>
    from tabulate import tabulate
/usr/lib/python3.10/site-packages/tabulate.py:16: in <module>
    from collections import Iterable
E   ImportError: cannot import name 'Iterable' from 'collections' (/usr/lib64/python3.10/collections/__init__.py)
______________________ ERROR collecting tests/test_map.py ______________________
ImportError while importing test module '/builddir/build/BUILD/home-assistant-cli-0.9.1/tests/test_map.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_map.py:9: in <module>
    import homeassistant_cli.cli as cli
homeassistant_cli/cli.py:14: in <module>
    from homeassistant_cli.helper import debug_requests_on, to_tuples
homeassistant_cli/helper.py:10: in <module>
    from tabulate import tabulate
/usr/lib/python3.10/site-packages/tabulate.py:16: in <module>
    from collections import Iterable
E   ImportError: cannot import name 'Iterable' from 'collections' (/usr/lib64/python3.10/collections/__init__.py)
____________________ ERROR collecting tests/test_plugins.py ____________________
ImportError while importing test module '/builddir/build/BUILD/home-assistant-cli-0.9.1/tests/test_plugins.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_plugins.py:7: in <module>
    from homeassistant_cli.cli import HomeAssistantCli, cli
homeassistant_cli/cli.py:14: in <module>
    from homeassistant_cli.helper import debug_requests_on, to_tuples
homeassistant_cli/helper.py:10: in <module>
    from tabulate import tabulate
/usr/lib/python3.10/site-packages/tabulate.py:16: in <module>
    from collections import Iterable
E   ImportError: cannot import name 'Iterable' from 'collections' (/usr/lib64/python3.10/collections/__init__.py)
______________________ ERROR collecting tests/test_raw.py ______________________
ImportError while importing test module '/builddir/build/BUILD/home-assistant-cli-0.9.1/tests/test_raw.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_raw.py:10: in <module>
    import homeassistant_cli.cli as cli
homeassistant_cli/cli.py:14: in <module>
    from homeassistant_cli.helper import debug_requests_on, to_tuples
homeassistant_cli/helper.py:10: in <module>
    from tabulate import tabulate
/usr/lib/python3.10/site-packages/tabulate.py:16: in <module>
    from collections import Iterable
E   ImportError: cannot import name 'Iterable' from 'collections' (/usr/lib64/python3.10/collections/__init__.py)
____________________ ERROR collecting tests/test_service.py ____________________
ImportError while importing test module '/builddir/build/BUILD/home-assistant-cli-0.9.1/tests/test_service.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_service.py:8: in <module>
    import homeassistant_cli.cli as cli
homeassistant_cli/cli.py:14: in <module>
    from homeassistant_cli.helper import debug_requests_on, to_tuples
homeassistant_cli/helper.py:10: in <module>
    from tabulate import tabulate
/usr/lib/python3.10/site-packages/tabulate.py:16: in <module>
    from collections import Iterable
E   ImportError: cannot import name 'Iterable' from 'collections' (/usr/lib64/python3.10/collections/__init__.py)
_____________________ ERROR collecting tests/test_state.py _____________________
ImportError while importing test module '/builddir/build/BUILD/home-assistant-cli-0.9.1/tests/test_state.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_state.py:8: in <module>
    import homeassistant_cli.cli as cli
homeassistant_cli/cli.py:14: in <module>
    from homeassistant_cli.helper import debug_requests_on, to_tuples
homeassistant_cli/helper.py:10: in <module>
    from tabulate import tabulate
/usr/lib/python3.10/site-packages/tabulate.py:16: in <module>
    from collections import Iterable
E   ImportError: cannot import name 'Iterable' from 'collections' (/usr/lib64/python3.10/collections/__init__.py)
=========================== short test summary info ============================
ERROR tests/test_area.py
ERROR tests/test_completion.py
ERROR tests/test_defaults.py
ERROR tests/test_device.py
ERROR tests/test_helper.py
ERROR tests/test_info.py
ERROR tests/test_map.py
ERROR tests/test_plugins.py
ERROR tests/test_raw.py
ERROR tests/test_service.py
ERROR tests/test_state.py
!!!!!!!!!!!!!!!!!!! Interrupted: 11 errors during collection !!!!!!!!!!!!!!!!!!!
============================== 11 errors in 0.73s ==============================

bpo-37324: Remove deprecated aliases to Collections Abstract Base Classes
from the collections module.

https://docs.python.org/3.10/whatsnew/changelog.html#python-3-10-0-alpha-5

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.10/fedora-rawhide-x86_64/01951963-home-assistant-cli/

For all our attempts to build home-assistant-cli with Python 3.10, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.10/package/home-assistant-cli/

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.10:
https://copr.fedorainfracloud.org/coprs/g/python/python3.10/

Let us know here if you have any questions.

Python 3.10 will be included in Fedora 35. To make that update smoother, we're building Fedora packages with early pre-releases of Python 3.10.
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 Ben Cotton 2021-02-09 16:05:33 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 34 development cycle.
Changing version to 34.

Comment 2 Miro Hrončok 2021-06-04 20:15:34 UTC
This is a mass-posted update. Sorry if it is not 100% accurate to this bugzilla.


The Python 3.10 rebuild is in progress in a Koji side tag. If you manage to fix the problem, please commit the fix in the rawhide branch, but don't build the package in regular rawhide.

You can either build the package in the side tag, with:

    $ fedpkg build --target=f35-python

Or you can the build and we will eventually build it for you.

Note that the rebuild is still in progress, so not all (build) dependencies of this package might be available right away.

Thanks.

See also https://fedoraproject.org/wiki/Changes/Python3.10

If you have general questions about the rebuild, please use this mailing list thread: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/G47SGOYIQLRDTWGOSLSWERZSSHXDEDH5/

Comment 3 Miro Hrončok 2021-06-07 22:59:58 UTC
The f35-python side tag has been merged to Rawhide. From now on, build as you would normally build.

Comment 4 Miro Hrončok 2021-06-14 10:37:03 UTC
This package was successfully rebuilt with Python 3.10.

If you need this bugzilla open for tracking purposes, sorry for the automatic closing: feel free to reopen it.


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