Skip to content
Permalink
Browse files

Pin pytest version to avoid induced breakage from more-itertools tran…

…sitive dep (pantsbuild#7238)

### Problem

A floating transitive dependency of pytest, `more-itertools`, dropped support for python 2 in its 6.0.0 release -- see pytest-dev/pytest#4770. This is currently breaking our and our users' CI: see https://travis-ci.org/pantsbuild/pants/jobs/492004734. We could pin that dep, but as mentioned in pytest-dev/pytest#4770 (comment), pinning transitive deps of pytest would impose requirement constraints on users of pytest in pants.

### Solution

- Pin `pytest==3.0.7` for now.

### Result

python tests should no longer be broken.
  • Loading branch information...
cosmicexplorer committed Feb 12, 2019
1 parent 3d7a295 commit d0432df3b4ab356c5b9ddf1d7ad5b4aeeab87b66
@@ -14,7 +14,9 @@ class PyTest(Subsystem):
def register_options(cls, register):
super(PyTest, cls).register_options(register)
# TODO: This is currently bounded below `3.7` due to #6282.
register('--requirements', advanced=True, default='pytest>=3.0.7,<3.7',
# TODO: Additionally, this is temporarily pinned to 3.0.7 due to more-itertools 6.0.0 dropping
# Python 2 support: https://github.com/pytest-dev/pytest/issues/4770.
register('--requirements', advanced=True, default='pytest==3.0.7',
help='Requirements string for the pytest library.')
register('--timeout-requirements', advanced=True, default='pytest-timeout>=1.2,<1.3',
help='Requirements string for the pytest-timeout library.')
@@ -72,7 +72,7 @@ def test_passing_python_test(self):
platform SOME_TEXT
rootdir: SOME_TEXT
plugins: SOME_TEXT
collected 1 item
collected 1 items
testprojects/tests/python/pants/dummies/test_pass.py . [100%]
@@ -92,7 +92,7 @@ def test_failing_python_test(self):
platform SOME_TEXT
rootdir: SOME_TEXT
plugins: SOME_TEXT
collected 1 item
collected 1 items
testprojects/tests/python/pants/dummies/test_fail.py F [100%]
@@ -120,7 +120,7 @@ def test_source_dep(self):
platform SOME_TEXT
rootdir: SOME_TEXT
plugins: SOME_TEXT
collected 1 item
collected 1 items
testprojects/tests/python/pants/dummies/test_with_source_dep.py . [100%]
@@ -139,7 +139,7 @@ def test_thirdparty_dep(self):
platform SOME_TEXT
rootdir: SOME_TEXT
plugins: SOME_TEXT
collected 1 item
collected 1 items
testprojects/tests/python/pants/dummies/test_with_thirdparty_dep.py . [100%]
@@ -160,7 +160,7 @@ def test_mixed_python_tests(self):
platform SOME_TEXT
rootdir: SOME_TEXT
plugins: SOME_TEXT
collected 1 item
collected 1 items
testprojects/tests/python/pants/dummies/test_fail.py F [100%]
@@ -177,7 +177,7 @@ def test_fail():
platform SOME_TEXT
rootdir: SOME_TEXT
plugins: SOME_TEXT
collected 1 item
collected 1 items
testprojects/tests/python/pants/dummies/test_pass.py . [100%]

0 comments on commit d0432df

Please sign in to comment.
You can’t perform that action at this time.