Skip to content
This repository was archived by the owner on Nov 1, 2024. It is now read-only.
This repository was 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

@bdice

Description

@bdice

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'

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions