pytest-lazy-fixture: Raise error with `pytest==8.0.0`
Hi! pytest-lazy-fixture doesn’t work with pytest==8.0.0
AttributeError: 'CallSpec2' object has no attribute 'funcargs'
About this issue
- Original URL
- State: open
- Created 5 months ago
- Reactions: 48
- Comments: 20 (3 by maintainers)
Links to this issue
Commits related to this issue
- dev-python/pytest-lazy-fixture: Require <dev-python/pytest-8 Bug: https://github.com/TvoroG/pytest-lazy-fixture/issues/65 Signed-off-by: Michał Górny <mgorny@gentoo.org> — committed to gentoo/gentoo by mgorny 5 months ago
- MINOR: [Python][CI] Add upper bound on pytest version The PyArrow test suite relies on the pytest-lazy-fixture plugin, which breaks on pytest 8.0.0: https://github.com/TvoroG/pytest-lazy-fixture/issu... — committed to pitrou/arrow by pitrou 5 months ago
- MINOR: [Python][CI] Add upper bound on pytest version (#39827) ### Rationale for this change The PyArrow test suite relies on the pytest-lazy-fixture plugin, which breaks on pytest 8.0.0: https://gi... — committed to apache/arrow by pitrou 5 months ago
- remove pytest-lazy-fixture from dev dependencies Related to error discussed in https://github.com/TvoroG/pytest-lazy-fixture/issues/65 Update pytest version in requirements-dev.txt Temporarily igno... — committed to elisno/cleanlab by elisno 5 months ago
- Work around a pytest-lazy-fixture issue https://github.com/TvoroG/pytest-lazy-fixture/issues/65 — committed to manopapad/legate.core by manopapad 5 months ago
- Work around a pytest-lazy-fixture issue (#933) https://github.com/TvoroG/pytest-lazy-fixture/issues/65 — committed to nv-legate/legate.core by manopapad 5 months ago
- Workaround pytest version bump incompatibility with pytest-lazy-fixtures plugin See Also: https://github.com/TvoroG/pytest-lazy-fixture/issues/65 — committed to bpkroth/MLOS by bpkroth 5 months ago
- Workaround pytest version bump incompatibility with pytest-lazy-fixtures plugin (#656) See Also: - https://github.com/TvoroG/pytest-lazy-fixture/issues/65 - https://github.com/pytest-dev/pytest/iss... — committed to microsoft/MLOS by bpkroth 5 months ago
- Cut pytest-lazy-fixture Pytest-lazy-fixture doesn't work with version pytest==8.0.0 The following error occurs: AttributeError: 'CallSpec2' object has no attribute 'funcargs' This has been rais... — committed to Liam-Sturge/tvm by Liam-Sturge 5 months ago
- tests: fix pytest to <7 at the moment Until https://github.com/TvoroG/pytest-lazy-fixture/issues/65 is fixed. — committed to yaal-coop/canaille by azmeuk 5 months ago
- [CI] Cut pytest-lazy-fixture (#16512) Pytest-lazy-fixture doesn't work with version pytest==8.0.0 The following error occurs: AttributeError: 'CallSpec2' object has no attribute 'funcargs' ... — committed to apache/tvm by Liam-Sturge 5 months ago
- replace lazy_fixture following https://github.com/TvoroG/pytest-lazy-fixture/issues/65#issuecomment-1914527162 — committed to observingClouds/xbitinfo by observingClouds 5 months ago
- Merge pull request #258 from observingClouds/fix_pytest_lazy_fixture Fix pytest lazy fixture pytest_lazy_fixture causes issues with pytest==8.0.0. This implements the workaround mentioned in Tv... — committed to observingClouds/xbitinfo by observingClouds 5 months ago
- Ignore test files which use pytest-lazy-fixture pytest-lazy-fixture is abandoned and incompatible with pytest 8: https://github.com/TvoroG/pytest-lazy-fixture/issues/65 We decided to ignore these f... — committed to ESSS/reaktoro by nicoddemus 5 months ago
- tests: remove pytest-lazy-fixture Since it's no longer being maintained. See https://github.com/TvoroG/pytest-lazy-fixture/issues/65. — committed to skshetry/dvc by skshetry 5 months ago
- tests: remove pytest-lazy-fixture Since it's no longer being maintained. See https://github.com/TvoroG/pytest-lazy-fixture/issues/65. — committed to skshetry/dvc by skshetry 5 months ago
- tests: remove pytest-lazy-fixture (#10294) Since it's no longer being maintained. See https://github.com/TvoroG/pytest-lazy-fixture/issues/65. — committed to iterative/dvc by skshetry 5 months ago
- Require pytest<8.0 This is needed becase of https://github.com/pytest-dev/pytest/issues/11890 https://github.com/TvoroG/pytest-lazy-fixture/issues/65 — committed to ANogin/ofrak by ANogin 5 months ago
- Use python3.8 in docker images (#416) * Use python3.8 in docker images * Require pytest<8.0 This is needed becase of https://github.com/pytest-dev/pytest/issues/11890 https://github.com/TvoroG... — committed to redballoonsecurity/ofrak by ANogin 5 months ago
- MINOR: [Python][CI] Add upper bound on pytest version (#39827) ### Rationale for this change The PyArrow test suite relies on the pytest-lazy-fixture plugin, which breaks on pytest 8.0.0: https://gi... — committed to dgreiss/arrow by pitrou 5 months ago
Since the main branch of this repo hasn’t seen an update in two years, I’ve been looking for an alternative. In my case, I was using something like this:
So following suggestions on StackOverflow and here, I changed that to
After uninstalling pytest-lazy-fixture, my tests are running just fine again. Hope this helps 😃
But seriously though, this should be a built-in feature in pytest itself.
There might be one more thing you can do: show the pytest devs in their existing issue to integrate pytest-lazy-fixture in core pytest that you’re interested in that 😃
Yeah, the only way forward is for the author of the new library to look at this project and fill in the missing functionality in theirs.
I still get an error with https://github.com/pytest-dev/pytest/pull/11888:
There is no traceback. This was the output I got when trying to run that trivial repro test module with pytest 7:
I’ve already raised an issue about this. I’m sticking with pytest 7.x in affected projects until it’s fixed.
I was able to easily replace this plugin with https://github.com/dev-petrov/pytest-lazy-fixtures:
I believe the order of arguments also changed, or am I misreading the 3 different versions in pytest-lazy-fixutre?
And yes, the other fix is that
CallSpec2.funcargswas merged intoCallSpec2.params? At least, stopping to accessfuncargsand only accessingparamsdid the trick. (So yes, actually my patch up there is not backwards compatible, right now.)