eve-sqlalchemy icon indicating copy to clipboard operation
eve-sqlalchemy copied to clipboard

ImportError: cannot import name 'Iterable' from 'collections'

Open jondkelley opened this issue 1 year ago • 0 comments

When running pip3 install eve_sqlalchemy on Python 3.11 the cerberus dependency fails. Are these projects still maintained? They were so useful in their prime.

Collecting eve_sqlalchemy
  Using cached Eve_SQLAlchemy-0.7.1-py2.py3-none-any.whl (80 kB)
Collecting Eve<0.8 (from eve_sqlalchemy)
  Using cached Eve-0.7.10.tar.gz (327 kB)
  Preparing metadata (setup.py) ... done
Collecting Flask-SQLAlchemy<2.999,>=2.4 (from eve_sqlalchemy)
  Using cached Flask_SQLAlchemy-2.5.1-py2.py3-none-any.whl (17 kB)
Requirement already satisfied: SQLAlchemy>=1.3 in /usr/local/lib/python3.11/site-packages/SQLAlchemy-2.0.25-py3.11-macosx-11-x86_64.egg (from eve_sqlalchemy) (2.0.25)
Collecting cerberus<0.10,>=0.9.2 (from Eve<0.8->eve_sqlalchemy)
  Using cached Cerberus-0.9.2.tar.gz (17 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [11 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/private/var/folders/6q/6p2df9rx61d1gjtx1gsvn1qh0000gn/T/pip-install-w23n997g/cerberus_fdb29db501c04cfc921c3ab1f5996202/setup.py", line 8, in <module>
          VERSION = __import__('cerberus').__version__
                    ^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/6q/6p2df9rx61d1gjtx1gsvn1qh0000gn/T/pip-install-w23n997g/cerberus_fdb29db501c04cfc921c3ab1f5996202/cerberus/__init__.py", line 11, in <module>
          from .cerberus import Validator, ValidationError, SchemaError
        File "/private/var/folders/6q/6p2df9rx61d1gjtx1gsvn1qh0000gn/T/pip-install-w23n997g/cerberus_fdb29db501c04cfc921c3ab1f5996202/cerberus/cerberus.py", line 15, in <module>
          from collections import Iterable, Mapping, Sequence
      ImportError: cannot import name 'Iterable' from 'collections' (/usr/local/Cellar/[email protected]/3.11.6_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/collections/__init__.py)
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

I think the Iterable abstract class was removed from collections in Python 3.10.

jondkelley avatar Jan 11 '24 22:01 jondkelley