-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
pytest-benchmark
: AttributeError: module 'py' has no attribute 'io'
#10420
Comments
Experiencing the same issue with the latest version of pytest 7.2.0 on different distributions. |
@ocelotl This is a bug in pytest-benchmark, due to it depending on Looks like this has been fixed in pytest-benchmark already: ionelmc/pytest-benchmark#226 - so once a new release with that is out, it should work again. @b3n3w Hard to say more without more details, but it's also very unlikely that you're seeing an issue in pytest. Check the traceback and the files involved to see the project responsible. |
pytest-benchmark
: AttributeError: module 'py' has no attribute 'io'
Pinning this for a while for visibility, as we had a duplicate opened already... |
note also you can work around by installing |
* ci: temporary fixup for pytest-benchmark bug See pytest-dev/pytest#10420 * ci: upgrade mkdocs to fix jinja2 API break * Update tox.ini * fixed Co-authored-by: Ofek Lev <ofekmeister@gmail.com>
* ci: temporary fixup for pytest-benchmark bug See pytest-dev/pytest#10420 * ci: upgrade mkdocs to fix jinja2 API break * Update tox.ini * fixed Co-authored-by: Ofek Lev <ofekmeister@gmail.com> 8a2c89d
Required to picked up ionelmc/pytest-benchmark#227 to get pytest 7.2.0 working. Thanks to pytest-dev/pytest#10420 for pointing the right way.
) * build(deps-dev): update pytest requirement from ~=7.1.3 to ~=7.2.0 Updates the requirements on [pytest](https://github.com/pytest-dev/pytest) to permit the latest version. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](pytest-dev/pytest@7.1.3...7.2.0) --- updated-dependencies: - dependency-name: pytest dependency-type: direct:development ... Signed-off-by: dependabot[bot] <support@github.com> * deps, dev: bump pytest-benchmark to 4.0.0 Required to picked up ionelmc/pytest-benchmark#227 to get pytest 7.2.0 working. Thanks to pytest-dev/pytest#10420 for pointing the right way. Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Pete Gadomski <pete.gadomski@gmail.com>
This is a bug introduced by pytest-benchmark pytest-dev/pytest#10420
Before, I couldn't run `poetry update` because there would be dependency conflicts, since pyarrow 7.0.0 requires python >3.7. In addition, there was a bug pytest-dev/pytest#10420 in pytest-benchmark <4.0 that was giving me errors when I had python>3.6 so I upgraded that when we have python >3.7. But pytest-benchmark 4 isn't compatible with python3.6, so I had to split the deps into two different cases. I tweaked the min python version from 3.6 to 3.6.2 because some packages were incompatible with 3.6.0 to 3.6.2, so it was easier to require just a slightly higher python Note that although now poetry is happy to solve dependencies for python 3.6, python 3.6 still doesn't actually work due to the `from __future__ import annotations` in linker.py. But this has a been a problem for months and we just seem to be ignoring the [failing 3.6 tests in CI](https://github.com/moj-analytical-services/splink/actions/workflows/pytest_36_compatibility.yml) Whatever though, at least this unblocks me so now I can actually develop splink. I think the next step is to actually remove 3.6 support, since 3.6 reached end of life in Dec 2021. Separate PR for that though.
In addition, there was a bug pytest-dev/pytest#10420 in pytest-benchmark <4.0, so I also updated that. Now tests pass!
I solved the issue buy reinstalling vcfstats using |
Rearranged the package to match the standards for poetry 1.4.2, left `pytest-profiling`, `snakeviz` and `pytest-benchmark` in dev.dependencies. Also had to force the version of pytest to something below 7.2.0 or else `py` is not installed which makes `pytest-benchmark` fail since it is required but not a dependenct (see pytest-dev/pytest#10420)
- Version constraints relaxed by setting >= - Separate production package dependencies from development environemnt dependencies in Pipfile - Add missing dependency on py, introduced by a dependency declaration error in a package used by pytest, see: pytest-dev/pytest#10420 Issue-Id: jackdewinter#708
When I run test cases with 7.2.0 I get this error:
When I do the same thing with pytest 7.1.3 tests pass.
Output of
pip list
when the error happens:Output of `pip list when the error does not happen:
Output of
lsb_release -a
:Minimal example:
Clone opentelemetry-python, run
tox -e py39-opentelemetry-sdk -- opentelemetry-sdk/tests/metrics/
By the way, thanks for all your work, Pytest is a cornerstone of our project!
pip list
from the virtual environment you are usingThe text was updated successfully, but these errors were encountered: