You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Deprecation warning when importing on Python 3.10 #104
However, the fix is not tolerant to Python 3.10's extra digit -- python_version_tuple() returns ('3', '10', '0a3'), and since these are strings '10' is treated as being less than '3'. The recommended way to perform this is:
ERROR: Failure: ImportError (cannot import name 'Iterable' from 'collections' (/usr/lib64/python3.10/collections/__init__.py))
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python3.10/site-packages/nose/failure.py", line 39, in runTest
raise self.exc_val.with_traceback(self.tb)
File "/usr/lib/python3.10/site-packages/nose/loader.py", line 416, in loadTestsFromName
module = self.importer.importFromPath(
File "/usr/lib/python3.10/site-packages/nose/importer.py", line 47, in importFromPath
return self.importFromDir(dir_path, fqname)
File "/usr/lib/python3.10/site-packages/nose/importer.py", line 94, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "/usr/lib64/python3.10/imp.py", line 234, in load_module
return load_source(name, filename, file)
File "/usr/lib64/python3.10/imp.py", line 171, in load_source
module = _load(spec)
File "<frozen importlib._bootstrap>", line 729, in _load
File "<frozen importlib._bootstrap>", line 698, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 833, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/builddir/build/BUILD/tabulate-0.8.7/test/test_regression.py", line 7, in <module>
from tabulate import tabulate, _text_type, _long_type, TableFormat, Line, DataRow
File "/builddir/build/BUILD/tabulate-0.8.7/tabulate.py", line 16, in <module>
from collections import Iterable
ImportError: cannot import name 'Iterable' from 'collections' (/usr/lib64/python3.10/collections/__init__.py)
Activity
hroncok commentedon Feb 8, 2021
This is now a hard ImportError since 3.10.0a5: