Skip to content

ImportError: cannot import name Iterable from collections on Python 3.10 #91

@lucasew

Description

@lucasew

It just doesn't work. It expects Iterable from collections but this is not available.

This log is from building python310Packages.fn with nix but should be reproducible on any python 3.10 out there

Sourcing python-remove-tests-dir-hook
Sourcing python-catch-conflicts-hook.sh
Sourcing python-remove-bin-bytecode-hook.sh
Sourcing setuptools-build-hook
Using setuptoolsBuildPhase
Using setuptoolsShellHook
Sourcing pip-install-hook
Using pipInstallPhase
Sourcing python-imports-check-hook.sh
Using pythonImportsCheckPhase
Sourcing python-namespaces-hook
Sourcing setuptools-check-hook
Using setuptoolsCheckPhase
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
unpacking source archive /nix/store/bhfhqwy9y6x63h4dq2lpimzkl0b2b29i-fn-0.4.3.tar.gz
source root is fn-0.4.3
setting SOURCE_DATE_EPOCH to timestamp 1407495729 of file fn-0.4.3/setup.cfg
@nix { "action": "setPhase", "phase": "patchPhase" }
patching sources
@nix { "action": "setPhase", "phase": "configurePhase" }
configuring
no configure script, doing nothing
@nix { "action": "setPhase", "phase": "buildPhase" }
building
Executing setuptoolsBuildPhase
Traceback (most recent call last):
  File "/build/fn-0.4.3/nix_run_setup", line 8, in <module>
    exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))
  File "setup.py", line 6, in <module>
    import fn
  File "/build/fn-0.4.3/fn/__init__.py", line 1, in <module>
    from .stream import Stream
  File "/build/fn-0.4.3/fn/stream.py", line 9, in <module>
    from .iters import map, range
  File "/build/fn-0.4.3/fn/iters.py", line 2, in <module>
    from collections import deque, Iterable
ImportError: cannot import name 'Iterable' from 'collections' (/nix/store/443qk9752l44kfp8pzsrp0m9jyq6jz2p-python3-3.10.3/lib/python3.10/collections/__init__.py)

Backlinks: NixOS/nixpkgs#167402

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions