Skip to content

Commit

Permalink
Bound pytest below 3.7 to avoid a ZipImportError (pantsbuild#6285)
Browse files Browse the repository at this point in the history
### Problem

As described in pantsbuild#6282, pytest `3.7` introduces a non-deterministic `ZipImportError`.

### Solution

Bound pants' usage of pytest below `3.7`. This subsumes pantsbuild#6283: the hypothesis is that because `tests/python/pants_test/backend/python/tasks/test_pytest_run.py` creates synthetic scopes for its tasks, options in `pants.ini` (as opposed to Subsystem defaults) are not applied. 

### Result

Works around pantsbuild#6282.
  • Loading branch information
Stu Hood authored and Chris Livingston committed Aug 27, 2018
1 parent 52ffdda commit b53471b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/python/pants/backend/python/subsystems/pytest.py
Expand Up @@ -13,7 +13,8 @@ class PyTest(Subsystem):
@classmethod
def register_options(cls, register):
super(PyTest, cls).register_options(register)
register('--requirements', advanced=True, default='pytest>=3.0.7,<4.0',
# TODO: This is currently bounded below `3.7` due to #6282.
register('--requirements', advanced=True, default='pytest>=3.0.7,<3.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.')
Expand Down

0 comments on commit b53471b

Please sign in to comment.