Skip to content

Commit 115143a

Browse files
committed
Adding explicit python 3.5.2 test to nox, travis
Python 3.5.2 introduced a bug in typing that was fixed in 3.5.3. The bug in typing prevents the latest nox from running properly. Ubuntu 16.04 stopped at python 3.5.2. To work-around, force an older version of nox when testing 3.5.2
1 parent 9d314de commit 115143a

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

.travis.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ language: python
22

33
matrix:
44
include:
5+
- os: linux
6+
python: 3.5.2
7+
env: NOXSESSION=tests-3.5.2
58
- os: linux
69
python: 3.5.3
710
env: NOXSESSION=tests-3.5.3
@@ -38,7 +41,7 @@ matrix:
3841
# - BREW_INSTALL=python3
3942

4043
install:
41-
- pip install flake8 nox
44+
- if [[ $TRAVIS_PYTHON_VERSION == 3.5.2 ]]; then pip install flake8 nox==2019.11.9; else pip install flake8 nox; fi
4245
# - |
4346
# if [[ $TRAVIS_OS_NAME == 'osx' ]]; then
4447
# if [[ -n "$BREW_INSTALL" ]]; then

noxfile.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def docs(session):
1414
'-d', '{}/doctrees'.format(tmpdir), '.', '{}/html'.format(tmpdir))
1515

1616

17-
@nox.session(python=['3.5.3', '3.5', '3.6', '3.7', '3.8', '3.9'])
17+
@nox.session(python=['3.5.2', '3.5.3', '3.5', '3.6', '3.7', '3.8', '3.9'])
1818
@nox.parametrize('plugin', [None,
1919
'ext_test',
2020
'template',
@@ -29,10 +29,9 @@ def tests(session, plugin):
2929
session.install('invoke', 'codecov', 'coverage')
3030
session.run('codecov')
3131
else:
32-
session.install('invoke', '.')
32+
session.install('invoke', './', 'plugins/{}[test]'.format(plugin))
3333

3434
# cd into test directory to run other unit test
35-
session.install('plugins/{}[test]'.format(plugin))
3635
session.run('invoke',
3736
'plugin.{}.pytest'.format(plugin.replace('_', '-')),
3837
'--junit',

setup.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,19 @@
5151
"mock ; python_version<'3.6'", # for python 3.5 we need the third party mock module
5252
'codecov',
5353
'coverage',
54-
'pytest',
54+
'pytest>=4.6',
5555
'pytest-cov',
5656
'pytest-mock',
5757
],
5858
# development only dependencies: install with 'pip install -e .[dev]'
5959
'dev': ["mock ; python_version<'3.6'", # for python 3.5 we need the third party mock module
60-
'pytest', 'codecov', 'pytest-cov', 'pytest-mock', 'nox', 'flake8',
60+
"pytest>=4.6",
61+
'codecov',
62+
'pytest-cov',
63+
'pytest-mock',
64+
"nox==2019.11.9 ; python_version=='3.5.2'",
65+
"nox ; python_version>'3.5.2'",
66+
'flake8',
6167
'sphinx', 'sphinx-rtd-theme', 'sphinx-autobuild', 'doc8',
6268
'invoke', 'twine>=1.11',
6369
]

0 commit comments

Comments
 (0)