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

Tests failed to run on 3.36.1 #969

Closed
felixonmars opened this issue Nov 11, 2017 · 8 comments
Closed

Tests failed to run on 3.36.1 #969

felixonmars opened this issue Nov 11, 2017 · 8 comments
Assignees
Labels
meta for wider topics than the software itself tests/build/CI about testing or deployment *of* Hypothesis

Comments

@felixonmars
Copy link
Contributor

Looks like warnings in other libraries are causing this since the removal of warning suppression in hypothesis:

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/_pytest/config.py", line 342, in _getconftestmodules
    return self._path2confmods[path]
KeyError: local('/build/python-hypothesis/src/hypothesis-python-3.36.1/tests')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/_pytest/config.py", line 373, in _importconftest
    return self._conftestpath2mod[conftestpath]
KeyError: local('/build/python-hypothesis/src/hypothesis-python-3.36.1/tests/conftest.py')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "setup.py", line 98, in <module>
    long_description=open(README).read(),
  File "/usr/lib/python3.6/site-packages/setuptools/__init__.py", line 129, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib/python3.6/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/usr/lib/python3.6/site-packages/ptr.py", line 194, in run
    self._super_run()
  File "/usr/lib/python3.6/site-packages/ptr.py", line 187, in _super_run
    self.with_project_on_sys_path(self.run_tests)
  File "/usr/lib/python3.6/site-packages/setuptools/command/test.py", line 114, in with_project_on_sys_path
    func()
  File "/usr/lib/python3.6/site-packages/ptr.py", line 208, in run_tests
    self.result_code = __import__('pytest').main()
  File "/usr/lib/python3.6/site-packages/_pytest/config.py", line 49, in main
    config = _prepareconfig(args, plugins)
  File "/usr/lib/python3.6/site-packages/_pytest/config.py", line 168, in _prepareconfig
    pluginmanager=pluginmanager, args=args)
  File "/usr/lib/python3.6/site-packages/pluggy/__init__.py", line 680, in __call__
    return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
  File "/usr/lib/python3.6/site-packages/pluggy/__init__.py", line 240, in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
  File "/usr/lib/python3.6/site-packages/pluggy/__init__.py", line 234, in <lambda>
    methods, kwargs, specopts=hook.spec_opts, hook=hook
  File "/usr/lib/python3.6/site-packages/pluggy/callers.py", line 110, in execute
    gen.send(outcome)
  File "/usr/lib/python3.6/site-packages/_pytest/helpconfig.py", line 68, in pytest_cmdline_parse
    config = outcome.get_result()
  File "/usr/lib/python3.6/site-packages/pluggy/callers.py", line 54, in get_result
    raise ex[1].with_traceback(ex[2])
  File "/usr/lib/python3.6/site-packages/pluggy/callers.py", line 94, in execute
    res = hook_impl.function(*args)
  File "/usr/lib/python3.6/site-packages/_pytest/config.py", line 957, in pytest_cmdline_parse
    self.parse(args)
  File "/usr/lib/python3.6/site-packages/_pytest/config.py", line 1121, in parse
    self._preparse(args, addopts=addopts)
  File "/usr/lib/python3.6/site-packages/_pytest/config.py", line 1092, in _preparse
    args=args, parser=self._parser)
  File "/usr/lib/python3.6/site-packages/pluggy/__init__.py", line 680, in __call__
    return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
  File "/usr/lib/python3.6/site-packages/pluggy/__init__.py", line 240, in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
  File "/usr/lib/python3.6/site-packages/pluggy/__init__.py", line 234, in <lambda>
    methods, kwargs, specopts=hook.spec_opts, hook=hook
  File "/usr/lib/python3.6/site-packages/pluggy/callers.py", line 115, in execute
    return outcome.get_result()
  File "/usr/lib/python3.6/site-packages/pluggy/callers.py", line 54, in get_result
    raise ex[1].with_traceback(ex[2])
  File "/usr/lib/python3.6/site-packages/pluggy/callers.py", line 94, in execute
    res = hook_impl.function(*args)
  File "/usr/lib/python3.6/site-packages/_pytest/config.py", line 1003, in pytest_load_initial_conftests
    self.pluginmanager._set_initial_conftests(early_config.known_args_namespace)
  File "/usr/lib/python3.6/site-packages/_pytest/config.py", line 328, in _set_initial_conftests
    self._try_load_conftest(current)
  File "/usr/lib/python3.6/site-packages/_pytest/config.py", line 336, in _try_load_conftest
    self._getconftestmodules(x)
  File "/usr/lib/python3.6/site-packages/_pytest/config.py", line 356, in _getconftestmodules
    mod = self._importconftest(conftestpath)
  File "/usr/lib/python3.6/site-packages/_pytest/config.py", line 392, in _importconftest
    self.consider_conftest(mod)
  File "/usr/lib/python3.6/site-packages/_pytest/config.py", line 415, in consider_conftest
    self.register(conftestmodule, name=conftestmodule.__file__)
  File "/usr/lib/python3.6/site-packages/_pytest/config.py", line 264, in register
    ret = super(PytestPluginManager, self).register(plugin, name)
  File "/usr/lib/python3.6/site-packages/pluggy/__init__.py", line 265, in register
    hookimpl = HookImpl(plugin, plugin_name, method, hookimpl_opts)
  File "/usr/lib/python3.6/site-packages/pluggy/__init__.py", line 721, in __init__
    self.argnames, self.kwargnames = varnames(self.function)
  File "/usr/lib/python3.6/site-packages/pluggy/__init__.py", line 561, in varnames
    spec = inspect.getargspec(func)
  File "/usr/lib/python3.6/inspect.py", line 1068, in getargspec
    DeprecationWarning, stacklevel=2)
DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec()
@alexwlchan
Copy link
Contributor

Is this in the Hypothesis test suite, or a test suite that uses Hypothesis? I can’t tell from the stack trace.

@DRMacIver
Copy link
Member

DRMacIver commented Nov 11, 2017

I assume this is in the Hypothesis test suite (@felixonmars is the one who packages Hypothesis for Arch).

I'm a little confused about why we're not hitting this in our build though! I thought at first that one of the other Arch packages might not be up to date, but this is coming from pluggy, which is up to date and besides which indeed uses a deprecated API in the latest version.

@DRMacIver
Copy link
Member

It's relatively easy to work around BTW. We just need to give some sort of option (or you could apply a patch) to set this argument to False

@felixonmars
Copy link
Contributor Author

pytest uses a bundled old pluggy by default, that could be the reason why you are not hitting this. In the distro package we debundled pytest and it uses latest pluggy.

The workaround works fine here, thanks!

@DRMacIver
Copy link
Member

pytest uses a bundled old pluggy by default, that could be the reason why you are not hitting this. In the distro package we debundled pytest and it uses latest pluggy.

Oh, right, that would do it, yeah.

Are you OK relying on the patch workaround or would you like us to provide you something more official to hook into? If the former I'll close this issue.

@felixonmars
Copy link
Contributor Author

IMHO distro packaging doesn't like things like Werror, so it would make sense to disable it more easily :)

@Zac-HD Zac-HD added tests/build/CI about testing or deployment *of* Hypothesis meta for wider topics than the software itself labels Nov 23, 2017
@Zac-HD
Copy link
Member

Zac-HD commented Nov 26, 2017

IMHO distro packaging doesn't like things like Werror, so it would make sense to disable it more easily :)

Would checking an environment variable be sufficient? (eg. set $HYPOTHESIS_TESTS_NO_WERROR to avoid error on deprecation warning) If so I can make a quick pull to get this out of the way 😄

@felixonmars
Copy link
Contributor Author

Of course, that would be much appreciated :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
meta for wider topics than the software itself tests/build/CI about testing or deployment *of* Hypothesis
Projects
None yet
Development

No branches or pull requests

4 participants