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 3 years ago
- Reactions: 86
- Comments: 22 (3 by maintainers)
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 3 years 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 3 years 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 3 years 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 3 years ago
- Work around a pytest-lazy-fixture issue https://github.com/TvoroG/pytest-lazy-fixture/issues/65 — committed to manopapad/legate.core by manopapad 3 years ago
- Work around a pytest-lazy-fixture issue (#933) https://github.com/TvoroG/pytest-lazy-fixture/issues/65 — committed to nv-legate/legate by manopapad 3 years 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 3 years 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 3 years 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 3 years 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 3 years 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 3 years ago
- replace lazy_fixture following https://github.com/TvoroG/pytest-lazy-fixture/issues/65#issuecomment-1914527162 — committed to observingClouds/xbitinfo by observingClouds 3 years 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 3 years 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 3 years 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 3 years 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 3 years 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 3 years 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 3 years 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 3 years 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 3 years 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 😃
The package seems to be fully replaced with lazy-fixtures which seems to have all the features we get used to.
Hi All,
As mentioned by @glatterf42, it looks like this issue might never get fixed. So what I did was to come out with my own local
pytest-lazy-fixtureplugin like this:By now I am simply including this into my root
conftest.py.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 😃
For the record, the minimal set of changes to make things work again doesn’t seem to be that massive. This works for me, passing pytest-lazy-fixture’s test set (not running tox, just running Python 3.10 with pytest 8.0.0):
But the bigger question is of course how much more overdue maintenance is waiting to happen, and whether whether @TvoroG would be interested to keep maintaining or to transfer maintenance to someone else (cfr #63).
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.)