Address collections.abc import warning introduced in Python 3.7 #124
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.abc
and fall back tocollections
to keep backward compatibility with Python 2.In addition, I made a few updates to the
requirements-dev.txt
that I needed to run the tests in Python 3.7.wsgiref
in Python 2, since it's not supported in Python 3 (and is instead included in the standard library)ecdsa
since it is a duplicate requirement fromrequirements.txt
and pip complainspytest
,py
,pytest-cov
,coverage
, andcoveralls
packages to get tests to pass with Python 2 and 3.cryptography
package 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.txt
and 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.