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

Error with pytest==4.1.0 #141

Closed
joshbode opened this issue Jan 6, 2019 · 5 comments
Closed

Error with pytest==4.1.0 #141

joshbode opened this issue Jan 6, 2019 · 5 comments

Comments

@joshbode
Copy link

joshbode commented Jan 6, 2019

Hello,

I've just upgraded to pytest==4.1.0 today and I'm getting an error with pytest-benchmark==3.1.1:

INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "/Users/josh/.virtualenvs/default/lib/python3.7/site-packages/_pytest/main.py", line 199, in wrap_session
INTERNALERROR>     config._do_configure()
INTERNALERROR>   File "/Users/josh/.virtualenvs/default/lib/python3.7/site-packages/_pytest/config/__init__.py", line 636, in _do_configure
INTERNALERROR>     self.hook.pytest_configure.call_historic(kwargs=dict(config=self))
INTERNALERROR>   File "/Users/josh/.virtualenvs/default/lib/python3.7/site-packages/pluggy/hooks.py", line 306, in call_historic
INTERNALERROR>     res = self._hookexec(self, self.get_hookimpls(), kwargs)
INTERNALERROR>   File "/Users/josh/.virtualenvs/default/lib/python3.7/site-packages/pluggy/manager.py", line 67, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR>   File "/Users/josh/.virtualenvs/default/lib/python3.7/site-packages/pluggy/manager.py", line 61, in <lambda>
INTERNALERROR>     firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
INTERNALERROR>   File "/Users/josh/.virtualenvs/default/lib/python3.7/site-packages/pluggy/callers.py", line 208, in _multicall
INTERNALERROR>     return outcome.get_result()
INTERNALERROR>   File "/Users/josh/.virtualenvs/default/lib/python3.7/site-packages/pluggy/callers.py", line 80, in get_result
INTERNALERROR>     raise ex[1].with_traceback(ex[2])
INTERNALERROR>   File "/Users/josh/.virtualenvs/default/lib/python3.7/site-packages/pluggy/callers.py", line 187, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "/Users/josh/.virtualenvs/default/lib/python3.7/site-packages/pytest_benchmark/plugin.py", line 427, in pytest_configure
INTERNALERROR>     bs = config._benchmarksession = BenchmarkSession(config)
INTERNALERROR>   File "/Users/josh/.virtualenvs/default/lib/python3.7/site-packages/pytest_benchmark/session.py", line 31, in __init__
INTERNALERROR>     self.logger = Logger(self.verbose, config)
INTERNALERROR>   File "/Users/josh/.virtualenvs/default/lib/python3.7/site-packages/pytest_benchmark/logger.py", line 16, in __init__
INTERNALERROR>     self.pytest_warn = config.warn
INTERNALERROR> AttributeError: 'Config' object has no attribute 'warn'

If I downgrade back to pytest==4.0.2 there is no error.

I'm on Python 3.7 on macOS

@joshbode
Copy link
Author

joshbode commented Jan 6, 2019

Looks like this may be the cause:
pytest-dev/pytest/issues/3078
pytest-dev/pytest/pull/4542

@chrahunt
Copy link

chrahunt commented Jan 6, 2019

This error is mentioned in #124 and already fixed pending a new release of pytest-benchmark.

@joshbode
Copy link
Author

joshbode commented Jan 6, 2019

Oops - sorry, didn't see that one - closing

@ionelmc
Copy link
Owner

ionelmc commented Jan 7, 2019

3.2.0 was just released.

@joshbode
Copy link
Author

joshbode commented Jan 7, 2019

Awesome - thank you - just tested and it works well for me again :)

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

3 participants