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

Test suite is failing on master: No module named 'hypothesis.extra.pytestplugin' #1655

Closed
shoyer opened this issue Oct 24, 2017 · 11 comments
Closed

Comments

@shoyer
Copy link
Member

shoyer commented Oct 24, 2017

Links:

I'm not quite sure what's going on here, but the tests aren't even running:

0.52s$ py.test xarray --cov=xarray --cov-config ci/.coveragerc --cov-report term-missing --verbose $EXTRA_FLAGS
Traceback (most recent call last):
 File "/home/travis/miniconda/envs/test_env/bin/py.test", line 6, in <module>
 sys.exit(py.test.main())
 File "/home/travis/miniconda/envs/test_env/lib/python3.6/site-packages/_pytest/config.py", line 49, in main
 config = _prepareconfig(args, plugins)
 File "/home/travis/miniconda/envs/test_env/lib/python3.6/site-packages/_pytest/config.py", line 168, in _prepareconfig
 pluginmanager=pluginmanager, args=args)
 File "/home/travis/miniconda/envs/test_env/lib/python3.6/site-packages/_pytest/vendored_packages/pluggy.py", line 745, in __call__
 return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
 File "/home/travis/miniconda/envs/test_env/lib/python3.6/site-packages/_pytest/vendored_packages/pluggy.py", line 339, in _hookexec
 return self._inner_hookexec(hook, methods, kwargs)
 File "/home/travis/miniconda/envs/test_env/lib/python3.6/site-packages/_pytest/vendored_packages/pluggy.py", line 334, in <lambda>
 _MultiCall(methods, kwargs, hook.spec_opts).execute()
 File "/home/travis/miniconda/envs/test_env/lib/python3.6/site-packages/_pytest/vendored_packages/pluggy.py", line 613, in execute
 return _wrapped_call(hook_impl.function(*args), self.execute)
 File "/home/travis/miniconda/envs/test_env/lib/python3.6/site-packages/_pytest/vendored_packages/pluggy.py", line 250, in _wrapped_call
 wrap_controller.send(call_outcome)
 File "/home/travis/miniconda/envs/test_env/lib/python3.6/site-packages/_pytest/helpconfig.py", line 68, in pytest_cmdline_parse
 config = outcome.get_result()
 File "/home/travis/miniconda/envs/test_env/lib/python3.6/site-packages/_pytest/vendored_packages/pluggy.py", line 279, in get_result
 raise ex[1].with_traceback(ex[2])
 File "/home/travis/miniconda/envs/test_env/lib/python3.6/site-packages/_pytest/vendored_packages/pluggy.py", line 265, in __init__
 self.result = func()
 File "/home/travis/miniconda/envs/test_env/lib/python3.6/site-packages/_pytest/vendored_packages/pluggy.py", line 614, in execute
 res = hook_impl.function(*args)
 File "/home/travis/miniconda/envs/test_env/lib/python3.6/site-packages/_pytest/config.py", line 957, in pytest_cmdline_parse
 self.parse(args)
 File "/home/travis/miniconda/envs/test_env/lib/python3.6/site-packages/_pytest/config.py", line 1121, in parse
 self._preparse(args, addopts=addopts)
 File "/home/travis/miniconda/envs/test_env/lib/python3.6/site-packages/_pytest/config.py", line 1084, in _preparse
 self.pluginmanager.load_setuptools_entrypoints('pytest11')
 File "/home/travis/miniconda/envs/test_env/lib/python3.6/site-packages/_pytest/vendored_packages/pluggy.py", line 510, in load_setuptools_entrypoints
 plugin = ep.load()
 File "/home/travis/miniconda/envs/test_env/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2409, in load
 return self.resolve()
 File "/home/travis/miniconda/envs/test_env/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2415, in resolve
 module = __import__(self.module_name, fromlist=['__name__'], level=0)
ModuleNotFoundError: No module named 'hypothesis.extra.pytestplugin'
@shoyer
Copy link
Member Author

shoyer commented Oct 24, 2017

This is particularly puzzling because as far as I know, we don't even use this plugin.

@jhamman
Copy link
Member

jhamman commented Oct 24, 2017

I've been getting the same failure on #1609. Only on Python 3.5 and 3.6.

@shoyer
Copy link
Member Author

shoyer commented Oct 25, 2017

I did a diff on the build output from passing and failing builds, and conda is installing literally the exact same upstream dependencies. I can't see any changes, beyond the time which the builds were run, how long downloads take and of course whether the test crashes at the end or not.

@shoyer
Copy link
Member Author

shoyer commented Oct 25, 2017

Let's see what happens when I trigger a pandas build: https://travis-ci.org/pandas-dev/pandas/builds/292375726 It doesn't seem to be an issue for pandas.

@shoyer
Copy link
Member Author

shoyer commented Oct 25, 2017

@jhamman
Copy link
Member

jhamman commented Oct 25, 2017

I can add some information here.

  1. Conda forge gives us hypothesis: 3.33.0-py36_0 and pytest is loading it as a plugin
  2. Pinning the conda version of hypothesis to 3.23 corrects the problem.
  3. Uninstalling hypothesis solves the problem
  4. Pip installing hypothesis solves the problem

So, I think we can conclude something went wrong with the conda-forge build of hypothesis or pytest.

Since we don't use hypothesis, we can disable it in one of a few ways. I'll open a PR with a fix in a few minutes.

@fmaussion
Copy link
Member

So, I think we can conclude something went wrong with the conda-forge build of hypothesis or pytest.

Ping our conda-forge expert @ocefpaf as he might be interested

@jhamman
Copy link
Member

jhamman commented Oct 25, 2017

There is now a open issue on conda-forge: conda-forge/hypothesis-feedstock#16

@ocefpaf
Copy link
Contributor

ocefpaf commented Oct 25, 2017

I removed the bad package and things should be back t normal. See https://anaconda.org/conda-forge/hypothesis/files?version=3.33.0

(Not sure what went wrong and I cannot look into it right now, but I guess that latest hypothesis is not crucial for you here.)

@shoyer
Copy link
Member Author

shoyer commented Oct 25, 2017

Thanks for tracking this down! How did we even get hypothesis installed in our CI environment? I guess things tend to bring in extra dependencies....

@jhamman
Copy link
Member

jhamman commented Oct 25, 2017

Exactly, conda-forge bundles optional dependencies in addition to required ones (e.g. conda-forge/xarray-feedstock#5).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants