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 1926080

Summary: packit fails to build with Python 3.10: ImportError: cannot import name 'Iterable' from 'collections'
Product: [Fedora] Fedora Reporter: Tomáš Hrnčiar <thrnciar>
Component: packitAssignee: Frantisek Lachman <flachman>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: dhodovsk, flachman, hcsomort, jpopelka, jscotka, lbarczio, mhroncok, thrnciar, ttomecek, user-cont-team+packit-fas, user-cont-team
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-03-05 14:30:12 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1926090    
Bug Blocks: 1890881    

Description Tomáš Hrnčiar 2021-02-08 07:37:38 UTC
packit fails to build with Python 3.10.0a5.

Traceback (most recent call last):
  File "/builddir/build/BUILD/packitos-0.24.0/setup.py", line 27, in <module>
    setup(use_scm_version=True)
  File "/usr/lib/python3.10/site-packages/setuptools/__init__.py", line 153, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib64/python3.10/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/lib64/python3.10/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/usr/lib64/python3.10/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/usr/lib/python3.10/site-packages/click_man/commands/man_pages.py", line 65, in run
    cli = entry_point.resolve()
  File "/usr/lib/python3.10/site-packages/pkg_resources/__init__.py", line 2456, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/builddir/build/BUILD/packitos-0.24.0/packit/cli/packit_base.py", line 28, in <module>
    from packit.cli.build import build
  File "/builddir/build/BUILD/packitos-0.24.0/packit/cli/build.py", line 29, in <module>
    from packit.cli.utils import cover_packit_exception, get_packit_api
  File "/builddir/build/BUILD/packitos-0.24.0/packit/cli/utils.py", line 35, in <module>
    from packit.api import PackitAPI
  File "/builddir/build/BUILD/packitos-0.24.0/packit/api.py", line 37, in <module>
    from tabulate import tabulate
  File "/usr/lib/python3.10/site-packages/tabulate.py", line 16, in <module>
    from collections import Iterable
ImportError: cannot import name 'Iterable' from 'collections' (/usr/lib64/python3.10/collections/__init__.py)

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/01952034-packit/

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

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 Frantisek Lachman 2021-02-08 08:28:01 UTC
I've created an upstream issue for that and hope we can fix that quickly:
https://github.com/packit/packit/issues/1101

(We release to Fedora bi-weekly.)

Comment 2 Miro Hrončok 2021-02-08 09:13:46 UTC
This needs a code change in tabulate, bz1926090.

Comment 3 Ben Cotton 2021-02-09 16:05:44 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 34 development cycle.
Changing version to 34.

Comment 4 Tomas Tomecek 2021-02-23 13:30:10 UTC
Miro and Tome, thank you for fixing tabulate!

I'm assuming that packit should now build for 3.10 in rawhide once we do a new upstream release in a week, is that correct?

Comment 5 Miro Hrončok 2021-02-23 13:45:35 UTC
Rawhide is still at Python 3.9.

The build with Python 3.10 only happen in Copr. Once you push to rawhide, copr should attempt to build it. But note that the packages in Copr are in a middle of dependency cluster...issue now, so it might fail because of that.

Comment 6 Tomáš Hrnčiar 2021-03-05 14:30:12 UTC
I am closing this since dependencies in Copr are now fixed and packit builds with 6th alpha of Python 3.10.