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

Add tests for python 3.7 #644

Open
wants to merge 6 commits into
base: v3.0.0-rc
from

Conversation

@daviskirk
Copy link
Contributor

daviskirk commented Jun 29, 2019

Since eventlet 0.25 fixed the main issues with running 3.7 (and eventlet also tests against 3.7) it's probably sensible to test nameko against 3.7 as well also.

Copy link
Member

davidszotten left a comment

great news, thanks for adding this!

as an aside (and not for this pr) we should consider dropping 3.4 which is now eol

we may also want to start thinking about dropping support for 2.7. @mattbennett should we consider dropping support for py2 in the upcoming 3.0 release?

.travis.yml Outdated Show resolved Hide resolved
Copy link
Member

mattbennett left a comment

Thanks for the PR @daviskirk!

.travis.yml Outdated Show resolved Hide resolved
.travis.yml Show resolved Hide resolved
@mattbennett

This comment has been minimized.

Copy link
Member

mattbennett commented Jun 29, 2019

@davidszotten there is a discussion about python versions on the forum

@daviskirk daviskirk force-pushed the daviskirk:test-py-37 branch from 2e711ef to 0f03ab6 Jun 30, 2019
- Update quick and branch tests to use only latest python 3 version (3.7)
- Correct typo
- Update pylint to python 3.7 compatible version
- Remove usage of mock patch "wraps" that hangs in python 3.7
@daviskirk daviskirk force-pushed the daviskirk:test-py-37 branch from 0f03ab6 to ded50e8 Jun 30, 2019
daviskirk added 4 commits Jun 30, 2019
@daviskirk

This comment has been minimized.

Copy link
Contributor Author

daviskirk commented Jul 1, 2019

There are a few more problems after all with eventlet (eventlet/eventlet#526). I'll leave this pull request as it is until those are fixed and then continue.

adamchainz added a commit to adamchainz/nameko that referenced this pull request Jul 10, 2019
Python 3.3 moved the ABC's from `collections` into `collections.abc`, Python 3.7 deprecates the use of them at the original location. Hence in my tests I saw Pytest gathering the warnings emitted from `collections.abc`:

```
tests/integration/test_nameko.py::test_server_error
  /private/tmp/tox/py37-django22/lib/python3.7/site-packages/nameko/exceptions.py:76: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
    if isinstance(value, collections.Iterable):
```

This PR fixes it to use a conditional import based on the Python version.

I see Python 3.7 will be tested in nameko#644, but this fix isn't in there.
adamchainz added a commit to adamchainz/nameko that referenced this pull request Jul 10, 2019
Python 3.3 moved the ABC's from `collections` into `collections.abc`, Python 3.7 deprecates the use of them at the original location. Hence in my tests I saw Pytest gathering the warnings emitted from `collections.abc`:

```
tests/integration/test_nameko.py::test_server_error
  /private/tmp/tox/py37-django22/lib/python3.7/site-packages/nameko/exceptions.py:76: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
    if isinstance(value, collections.Iterable):
```

This PR fixes it to use a conditional import based on the Python version.

I see Python 3.7 will be tested in nameko#644, but this fix isn't in there.
adamchainz added a commit to adamchainz/nameko that referenced this pull request Jul 12, 2019
Python 3.3 moved the ABC's from `collections` into `collections.abc`, Python 3.7 deprecates the use of them at the original location. Hence in my tests I saw Pytest gathering the warnings emitted from `collections.abc`:

```
tests/integration/test_nameko.py::test_server_error
  /private/tmp/tox/py37-django22/lib/python3.7/site-packages/nameko/exceptions.py:76: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
    if isinstance(value, collections.Iterable):
```

This PR fixes it to use a conditional import based on the Python version.

I see Python 3.7 will be tested in nameko#644, but this fix isn't in there.
mattbennett added a commit that referenced this pull request Jul 22, 2019
* Fix Python 3.7 warning on collections.abc

Python 3.3 moved the ABC's from `collections` into `collections.abc`, Python 3.7 deprecates the use of them at the original location. Hence in my tests I saw Pytest gathering the warnings emitted from `collections.abc`:

```
tests/integration/test_nameko.py::test_server_error
  /private/tmp/tox/py37-django22/lib/python3.7/site-packages/nameko/exceptions.py:76: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
    if isinstance(value, collections.Iterable):
```

This PR fixes it to use a conditional import based on the Python version.

I see Python 3.7 will be tested in #644, but this fix isn't in there.

* isort requires two lines after imports

* pylint needs exclusions too

* add no cover pragmas
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.