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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import the ABCs from 'collections.abc' instead of 'collections' #732

Merged
merged 1 commit into from
Oct 22, 2019
Merged

Import the ABCs from 'collections.abc' instead of 'collections' #732

merged 1 commit into from
Oct 22, 2019

Conversation

Colin-b
Copy link
Contributor

@Colin-b Colin-b commented Oct 14, 2019

Import the ABCs from 'collections.abc' instead of 'collections' by default as it is deprecated since Python3.7, and in 3.8 it will stop working.

I considered that Python3 is the de-facto standard as Python2 support is being dropped in every other Python project and support ends at end of year. This is why I removed the OrderedDict sample and use a builtin dict instead of they are ordered since 3.6

I however kept Python2 support in the unlikely event that some projects are still upgrading flask-restplus dependency while not upgrading to Python3.

I did not add any additional test case as I assume the test suite runs with Python2 as well as 3.X, if this is not the case I am more than happy to remove the extra TODO and try/except blocks in this PR.

closes #727

…fault as it is deprecated since Python3.7, and in 3.8 it will stop working.
@coveralls
Copy link

Coverage Status

Coverage increased (+0.08%) to 96.89% when pulling 136da9d on Colin-b:bugfix/python_38_support into 9b9ad42 on noirbizarre:master.

@andreykurilin
Copy link

looks good to me

@ziirish
Copy link
Collaborator

ziirish commented Oct 22, 2019

Thanks

@ziirish ziirish merged commit c25dc45 into noirbizarre:master Oct 22, 2019
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.

Python 3.8 support
4 participants