Skip to content

fix collections.abc.Iterable issue for python 3.8+#3

Open
xylophone21 wants to merge 2 commits intostoneskin:masterfrom
xylophone21:master
Open

fix collections.abc.Iterable issue for python 3.8+#3
xylophone21 wants to merge 2 commits intostoneskin:masterfrom
xylophone21:master

Conversation

@xylophone21
Copy link
Copy Markdown

https://stackoverflow.com/questions/53978542/how-to-use-collections-abc-from-both-python-3-8-and-python-2-7/

In Python 3.3 "abstract base classes" in collections (like MutableMapping or MutableSequence) were moved to second-level module collections.abc. So in Python 3.3+ the real type is collections.abc.MutableMapping and so on. Documentation states that the old alias names (e.g. collections.MutableMapping) will be available up to Python 3.7 (currently the latest version), however in 3.8 these aliases will be removed.

So, we should use collections.abc

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.

1 participant