Skip to content
This repository has been archived by the owner on Nov 1, 2024. It is now read-only.

[BUG] Pinning to pytest-benchmark 3.2.3 incompatible with pytest>=7.2.0. #65

Open
bdice opened this issue Jan 11, 2023 · 0 comments
Open
Labels
bug Something isn't working

Comments

@bdice
Copy link
Contributor

bdice commented Jan 11, 2023

Describe the bug
Version 7.2.0 of pytest changes some internals that pytest-benchmark was relying on, which broke the package when used with pytest 7.2.0. This package is pinned to pytest-benchmark=3.2.3 but the fixes to pytest-benchmark require a newer version >=4.0.0.

See issues:
ionelmc/pytest-benchmark#226
pytest-dev/pytest#10420

This manifested as the following error when migrating cuopt to use GitHub Actions (PR https://github.com/rapidsai/cuopt/pull/907):


/__w/cuopt/cuopt/python /__w/cuopt/cuopt
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "/opt/conda/envs/test/lib/python3.9/site-packages/_pytest/main.py", line 266, in wrap_session
INTERNALERROR>     config._do_configure()
INTERNALERROR>   File "/opt/conda/envs/test/lib/python3.9/site-packages/_pytest/config/__init__.py", line 1037, in _do_configure
INTERNALERROR>     self.hook.pytest_configure.call_historic(kwargs=dict(config=self))
INTERNALERROR>   File "/opt/conda/envs/test/lib/python3.9/site-packages/pluggy/_hooks.py", line 277, in call_historic
INTERNALERROR>     res = self._hookexec(self.name, self.get_hookimpls(), kwargs, False)
INTERNALERROR>   File "/opt/conda/envs/test/lib/python3.9/site-packages/pluggy/_manager.py", line 80, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
INTERNALERROR>   File "/opt/conda/envs/test/lib/python3.9/site-packages/pluggy/_callers.py", line 60, in _multicall
INTERNALERROR>     return outcome.get_result()
INTERNALERROR>   File "/opt/conda/envs/test/lib/python3.9/site-packages/pluggy/_result.py", line 60, in get_result
INTERNALERROR>     raise ex[1].with_traceback(ex[2])
INTERNALERROR>   File "/opt/conda/envs/test/lib/python3.9/site-packages/pluggy/_callers.py", line 39, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "/opt/conda/envs/test/lib/python3.9/site-packages/pytest_benchmark/plugin.py", line 442, in pytest_configure
INTERNALERROR>     bs = config._benchmarksession = BenchmarkSession(config)
INTERNALERROR>   File "/opt/conda/envs/test/lib/python3.9/site-packages/pytest_benchmark/session.py", line 32, in __init__
INTERNALERROR>     self.logger = Logger(self.verbose, config)
INTERNALERROR>   File "/opt/conda/envs/test/lib/python3.9/site-packages/pytest_benchmark/logger.py", line 18, in __init__
INTERNALERROR>     self.term = py.io.TerminalWriter(file=sys.stderr)
INTERNALERROR> AttributeError: module 'py' has no attribute 'io'
@bdice bdice added the bug Something isn't working label Jan 11, 2023
@bdice bdice changed the title [BUG] Pinning to pytest-benchmark 3.2.3 incompatible with latest pytest. [BUG] Pinning to pytest-benchmark 3.2.3 incompatible with pytest>=7.2.0. Jan 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant