Address collections.abc import warning introduced in Python 3.7#124
Merged
zejn merged 2 commits intompdavis:masterfrom Apr 9, 2019
Merged
Address collections.abc import warning introduced in Python 3.7#124zejn merged 2 commits intompdavis:masterfrom
zejn merged 2 commits intompdavis:masterfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #124 +/- ##
==========================================
+ Coverage 94.6% 94.63% +0.03%
==========================================
Files 13 13
Lines 1000 1006 +6
==========================================
+ Hits 946 952 +6
Misses 54 54
Continue to review full report at Codecov.
|
Contributor
Author
|
@mpdavis I grew up in Ames. Crazy coincidence! |
Contributor
Author
|
@zejn Tagging you because it looks like you are also a maintainer based on some recently merged PRs. Any tips for getting this PR shipped? |
Collaborator
|
This still looks good. Thank you for your first contribution. |
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
In Python 3.7, I am seeing the following warnings from this library:
This warning was introduced in this CPython commit.
To ensure future compatibility with Python 3.8, I've updated these imports to try importing from
collections.abcand fall back tocollectionsto keep backward compatibility with Python 2.In addition, I made a few updates to the
requirements-dev.txtthat I needed to run the tests in Python 3.7.wsgirefin Python 2, since it's not supported in Python 3 (and is instead included in the standard library)ecdsasince it is a duplicate requirement fromrequirements.txtand pip complainspytest,py,pytest-cov,coverage, andcoverallspackages to get tests to pass with Python 2 and 3.cryptographypackage required for tests.Testing
I created a virtualenv with both Python 2.7.14 and Python 3.7.1, ran
pip install -r requirements-dev.txtand then ran the tests withpytest tests. Output belowPython 2.7.14
Python 3.7.1
There are some additional deprecation warnings that are coming from
pytest, but I decided to stay conservative with the scope of this PR since it's my first contribution to this library.