Skip to content

Commit

Permalink
test on py3.7 through 3.9 (#726)
Browse files Browse the repository at this point in the history
* test on py38

* add 3.8 classifier

* upgrade flake8

and add a few ignores

* upgrade pylint

* upgrade coverage

* add one required pragma

* add py39 (and py37)

* forgot to update pins in tox.ini

* raise eventlet pin

* py38 and py29 require eventlet>=0.25.0

* add environment markers to encode the eventlet reqs

* 3.7 requires eventlet>=0.25.0 also

* add missing classifiers
  • Loading branch information
mattbennett committed Sep 30, 2021
1 parent 219fa6b commit 0c73912
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 18 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
matrix:
python-version:
- 3.6
- 3.9
- 2.7

steps:
Expand All @@ -44,7 +44,7 @@ jobs:
strategy:
matrix:
python-version:
- 3.6
- 3.9
- 2.7
steps:
- name: checkout
Expand Down Expand Up @@ -76,6 +76,9 @@ jobs:
strategy:
matrix:
python-version:
- 3.9
- 3.8
- 3.7
- 3.6
- 2.7
dependency-set:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ imports:
isort -rc $(autofix) nameko test

test_lib:
BRANCH=$(ENABLE_BRANCH_COVERAGE) coverage run -m pytest test --strict --timeout 30
BRANCH=$(ENABLE_BRANCH_COVERAGE) coverage run -m pytest test -v --strict --timeout 30
BRANCH=$(ENABLE_BRANCH_COVERAGE) coverage report

test_examples:
Expand Down
2 changes: 1 addition & 1 deletion nameko/cli/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def shutdown(signum, frame):
service_runner.kill()
else:
# runner.wait completed
break
break # pragma: no cover (coverage problem on py39)


def main(args):
Expand Down
2 changes: 1 addition & 1 deletion nameko/standalone/rpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def get_message(self, correlation_id):
# fires the connection is closed and must be re-established
self._setup_consumer()

except (IOError, ConnectionError) as exc:
except (IOError, ConnectionError):
# in case this was a temporary error, attempt to reconnect
# and try again. if we fail to reconnect, the error will bubble
self._setup_consumer()
Expand Down
6 changes: 5 additions & 1 deletion nameko/testing/pytest.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,11 @@ def rabbit_manager(request):

@pytest.yield_fixture(scope='session')
def vhost_pipeline(request, rabbit_manager):
from collections import Iterable
try:
from collections.abc import Iterable
except ImportError: # pragma: no cover
# py2 compatibility
from collections import Iterable # pylint: disable=E0611
from six.moves.urllib.parse import urlparse # pylint: disable=E0401
import random
import socket
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
universal = 1

[flake8]
ignore =
ignore = E402, E722, W504
max-line-length = 88
exclude = test/nameko_doc/example/*

Expand Down
16 changes: 9 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
install_requires=[
"dnspython<2",
"eventlet>=0.20.1",
"eventlet>=0.21.0 ; python_version>='3.6'",
"eventlet>=0.25.0 ; python_version>='3.7'",
"kombu>=4.2.0,<5",
"mock>=1.2",
"path.py>=6.2",
Expand All @@ -35,14 +37,11 @@
],
extras_require={
'dev': [
"astroid==1.6.5",
"coverage==4.5.1",
"flake8==3.3.0",
"coverage==5.5",
"flake8==3.9.2",
"isort==4.2.15",
"mccabe==0.6.1",
"pycodestyle==2.3.1",
"pyflakes==1.5.0",
"pylint==1.7.1",
"pylint==1.9.5 ; python_version<'3'",
"pylint==2.11.1 ; python_version>'3'",
"pytest==4.3.1",
"pytest-cov==2.5.1",
"pytest-timeout==1.3.3",
Expand Down Expand Up @@ -83,6 +82,9 @@
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Topic :: Internet",
"Topic :: Software Development :: Libraries :: Python Modules",
"Intended Audience :: Developers",
Expand Down
9 changes: 5 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
[tox]
envlist = {py2.7,py3.5,py3.6}-{oldest,pinned,latest,extra}-test, {py2.7,py3.5,py3.6}-latest-test-mastereventlet, py3.6-latest-test-branchcoverage, {py2.7,py3.6}-examples, docs, {py2.7,py3.6}-static
envlist = {py2.7,py3.5,py3.6,py3.7,py3.8,py3.9}-{oldest,pinned,latest,extra}-test, {py2.7,py3.5,py3.6}-latest-test-mastereventlet, py3.6-latest-test-branchcoverage, {py2.7,py3.9}-examples, docs, {py2.7,py3.9}-static
skipsdist = True

[testenv]
deps =
# oldest supported libraries for each python
{py2.7,py3.5}-oldest: eventlet==0.20.1
py3.6-oldest: eventlet==0.21.0
{py3.6}-oldest: eventlet==0.21.0
{py3.7,py3.8,py3.9}-oldest: eventlet==0.25.0
oldest: kombu==4.2.0
oldest: mock==1.2.0
oldest: path.py==6.2
Expand All @@ -16,7 +17,7 @@ deps =
oldest: wrapt==1.0.0

# pinned library versions
{py3.5,py3.6}-{pinned,extra}: eventlet==0.23.0
{py3.5,py3.6,py3.7}-{pinned,extra}: eventlet==0.26.0
pinned: kombu==4.2.1
pinned: mock==2.0.0
pinned: path.py==11.0.1
Expand All @@ -25,7 +26,7 @@ deps =
pinned: werkzeug==1.0.1
pinned: wrapt==1.10.11

{py3.5,py3.6}-extra: regex==2018.07.11
{py3.5,py3.6,py3.7,py3.8,py3.9}-extra: regex==2018.07.11


setenv =
Expand Down

0 comments on commit 0c73912

Please sign in to comment.