Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Iterable import to support Python>=3.3 #95

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Gennadiyev
Copy link

Whe running with CLI on Python>3.3, an error will be raised:

ImportError: cannot import name 'Iterable' from 'collections' (.../collections/__init__.py)

Cause

Introduced in python 3.3, the previous collections.Iterable is removed.

Potential Fix

  • Use six to provide an extra compatibility layer over type hints (with collection_abc)
  • Use the quick fix of a try except block

Commit Info

The latter solution is used for the sake of simplicity.

Tests

(馃煝 this commit has no breaking changes and is a minor patch.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant