Background
api/pyproject.toml currently depends on pytest-lazy-fixture==0.6.3, which has been unmaintained since 2020. It accesses pytest's internal CallSpec2.funcargs attribute, which was removed in pytest 9, so the package is incompatible with pytest 8 and above:
ERROR tests/unit/permissions/permission_service/test_get_permitted_projects_for_user.py - AttributeError: 'CallSpec2' object has no attribute 'funcargs'
This was surfaced while investigating #7756 (removing the [tool.uv].override-dependencies block). For now, pytest is capped at <8 in the dev extra to keep the existing tests green.
Proposed work
Migrate the ~297 lazy_fixture(...) call sites in api/tests/ to the maintained fork pytest-lazy-fixtures (note the plural), which uses a different API:
lazy_fixture("name") → lf("name")
- New:
lfc("name", arg) for fixture composition
Once migrated, the pytest cap can be lifted and we'll be able to take pytest 8/9 updates.
Acceptance criteria
Background
api/pyproject.tomlcurrently depends onpytest-lazy-fixture==0.6.3, which has been unmaintained since 2020. It accessespytest's internalCallSpec2.funcargsattribute, which was removed in pytest 9, so the package is incompatible with pytest 8 and above:This was surfaced while investigating #7756 (removing the
[tool.uv].override-dependenciesblock). For now,pytestis capped at<8in thedevextra to keep the existing tests green.Proposed work
Migrate the ~297
lazy_fixture(...)call sites inapi/tests/to the maintained forkpytest-lazy-fixtures(note the plural), which uses a different API:lazy_fixture("name")→lf("name")lfc("name", arg)for fixture compositionOnce migrated, the pytest cap can be lifted and we'll be able to take pytest 8/9 updates.
Acceptance criteria
pytest-lazy-fixturewithpytest-lazy-fixturesinapi/pyproject.tomlapi/tests/to the new APIpytest<8cap inapi/pyproject.toml