astanin / python-tabulate

Pretty-print tabular data in Python, a library and a command-line utility. Repository migrated from bitbucket.org/astanin/python-tabulate.
https://pypi.org/project/tabulate/
MIT License
2.16k stars 165 forks source link

Incompatibility with Python 3.11 #278

Open Anthirian opened 1 year ago

Anthirian commented 1 year ago

Version 0.9.0 is not compatible with Python 3.11. When importing the module the following stack trace is shown.

$ python3
Python 3.11.4 (main, Jun 28 2023, 19:51:46) [GCC] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tabulate
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/geert/.local/lib/python3.11/site-packages/tabulate.py", line 7, in <module>
    from collections import namedtuple, Iterable
ImportError: cannot import name 'Iterable' from 'collections' (/usr/lib64/python3.11/collections/__init__.py)

As can be seen in the release notes, the Iterable abstract class was removed from collections:

kotborealis commented 1 year ago

Should be already fixed, version from pip imports Iterable from collections.abc image