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
When trying to import it gives the following error:
>>> from collections.abc import OrderedDict
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: cannot import name 'OrderedDict' from 'collections.abc'
I have manually tested it on Python versions: 2.7, 3.4, 3.5, 3.6, 3.7 and 3.8.
The current code is not failing because of the try-except.
For tracking purposes, this change was made on PR #732 and is related to issue #727.
Can I submit a PR to solve this issue?
The text was updated successfully, but these errors were encountered:
Indeed you are right, OrderedDict is not an abstract base class and is not within collections.abc as stated in python documentation. I can also submit a PR to fix my initial mistake.
OrderedDict
should be imported fromcollections
instead ofcollections.abc
.For example:
flask-restplus/flask_restplus/model.py
Lines 8 to 12 in 9232e1a
When trying to import it gives the following error:
I have manually tested it on Python versions: 2.7, 3.4, 3.5, 3.6, 3.7 and 3.8.
The current code is not failing because of the
try-except
.For tracking purposes, this change was made on PR #732 and is related to issue #727.
Can I submit a PR to solve this issue?
The text was updated successfully, but these errors were encountered: