Skip to content

Commit 0091e0c

Browse files
authored
deps(api): Upgrade pytest to 9.0.3 and swap in pytest-lazy-fixtures (#8375)
1 parent 277a086 commit 0091e0c

38 files changed

Lines changed: 69 additions & 80 deletions

‎api/pyproject.toml‎

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ dependencies = [
4545
"django-filter>=2.4.0,<2.5.0",
4646
"flagsmith-flag-engine>=10.1.0,<11.0.0",
4747
"flagsmith-sql-flag-engine>=0.2.0,<0.3.0",
48-
"django-clickhouse-backend>=1.4,<2.0",
48+
"django-clickhouse-backend>=2,<3",
4949
"clickhouse-driver==0.2.11",
5050
"clickhouse-connect>=1.6.0,<2.0.0",
5151
"boto3>=1.35.95,<1.36.0",
@@ -88,14 +88,14 @@ dependencies = [
8888

8989
[project.optional-dependencies]
9090
private = [
91-
"flagsmith-private>=0.11.4,<1",
91+
"flagsmith-private>=0.12,<1",
9292
]
9393
dev = [
9494
"django-test-migrations>=1.2.0,<2.0.0",
9595
"responses>=0.22.0,<0.23.0",
9696
"pre-commit>=4.0.1,<5.0.0",
9797
"pytest-mock>=3.10.0,<3.11.0",
98-
"pytest-lazy-fixture>=0.6.3,<0.7.0",
98+
"pytest-lazy-fixtures>=1.4,<2",
9999
"moto>=4.1.3,<4.2.0",
100100
# TODO: move to https://github.com/adamchainz/time-machine
101101
"pytest-freezegun>=0.4.2,<0.5.0",
@@ -115,7 +115,7 @@ dev = [
115115
"mypy-boto3-dynamodb>=1.33.0,<2.0.0",
116116
"mypy-boto3-s3>=1.36.0,<2.0.0",
117117
"pytest-structlog>=1.1,<2.0.0",
118-
"pyfakefs>=5.7.4,<6.0.0",
118+
"pyfakefs>=6,<7",
119119
"mypy>=1.15.0,<2.0.0",
120120
"djangorestframework-stubs>=3.15.2,<4.0.0",
121121
"boto3-stubs>=1.36.20,<2.0.0",
@@ -158,16 +158,13 @@ explicit = true
158158

159159
[tool.uv.sources]
160160
flagsmith-private = { index = "flagsmith-pypi-production" }
161-
django-clickhouse-backend = { git = "https://github.com/jayvynl/django-clickhouse-backend", rev = "d884c7d" }
162161

163162
[tool.uv]
164163
required-version = ">=0.11.18" # Ensure this matches the version in .pre-commit-config.yaml
165164
# Pin every resolved package to the exact version that api/poetry.lock used on
166165
# main before this migration, so the poetry -> uv switch is dependency-neutral.
167166
# Keep this list in sync with poetry.lock until the lockfile churn settles.
168167
override-dependencies = [
169-
# TODO: remove once https://github.com/jayvynl/django-clickhouse-backend/issues/172 is closed
170-
"clickhouse-driver==0.2.11",
171168
"annotated-types==0.6.0",
172169
"anyio==4.12.1",
173170
"appdirs==1.4.4",
@@ -317,7 +314,6 @@ override-dependencies = [
317314
"pep8==1.7.1",
318315
"pexpect==4.9.0",
319316
"platformdirs==3.10.0",
320-
"pluggy==1.2.0",
321317
"pre-commit==4.0.1",
322318
"prometheus-client==0.21.1",
323319
"prompt-toolkit==3.0.52",
@@ -333,7 +329,6 @@ override-dependencies = [
333329
"pydantic==2.12.5",
334330
"pydantic-collections==0.6.0",
335331
"pydantic-core==2.41.5",
336-
"pyfakefs==5.7.4",
337332
"pygithub==2.8.1",
338333
"pygments==2.19.2",
339334
"pylint==2.16.4",
@@ -346,11 +341,9 @@ override-dependencies = [
346341
"pyreadline==2.1",
347342
"pyrepl==0.9.0",
348343
"pysaml2==7.4.2",
349-
"pytest==7.2.2",
350344
"pytest-cov==4.1.0",
351345
"pytest-django==4.8.0",
352346
"pytest-freezegun==0.4.2",
353-
"pytest-lazy-fixture==0.6.3",
354347
"pytest-mock==3.10.0",
355348
"pytest-responses==0.5.1",
356349
"pytest-structlog==1.1",

‎api/tests/conftest.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ def pytest_addoption(parser: pytest.Parser) -> None:
150150
)
151151

152152

153-
@pytest.hookimpl(trylast=True) # type: ignore[misc]
153+
@pytest.hookimpl(trylast=True)
154154
def pytest_configure(config: pytest.Config) -> None:
155155
if (
156156
config.option.ci

‎api/tests/integration/core/test_commands.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from django.db.models import Model
44
from djoser.utils import decode_uid # type: ignore[import-untyped]
55
from pytest_django.fixtures import SettingsWrapper
6-
from pytest_lazyfixture import lazy_fixture # type: ignore[import-untyped]
6+
from pytest_lazy_fixtures import lf as lazy_fixture
77

88
from organisations.models import (
99
Organisation,

‎api/tests/integration/core/test_user_rate_throttle.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import pytest
44
from django.urls import reverse
5-
from pytest_lazyfixture import lazy_fixture # type: ignore[import-untyped]
5+
from pytest_lazy_fixtures import lf as lazy_fixture
66
from pytest_mock import MockerFixture
77
from rest_framework import status
88
from rest_framework.test import APIClient

‎api/tests/integration/edge_api/identities/test_edge_identity_featurestates_viewset.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from django.urls import reverse
99
from mypy_boto3_dynamodb.service_resource import Table
1010
from mypy_boto3_dynamodb.type_defs import TableAttributeValueTypeDef
11-
from pytest_lazyfixture import lazy_fixture # type: ignore[import-untyped]
11+
from pytest_lazy_fixtures import lf as lazy_fixture
1212
from pytest_mock import MockerFixture
1313
from rest_framework import status
1414
from rest_framework.exceptions import NotFound

‎api/tests/integration/environments/identities/test_integration_identities.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
import pytest
77
from django.urls import reverse
8-
from pytest_lazyfixture import lazy_fixture # type: ignore[import-untyped]
8+
from pytest_lazy_fixtures import lf as lazy_fixture
99
from rest_framework import status
1010
from rest_framework.test import APIClient
1111

‎api/tests/integration/environments/test_integration_environments.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import pytest
55
from django.urls import reverse
66
from pytest_django.fixtures import DjangoAssertNumQueries
7-
from pytest_lazyfixture import lazy_fixture # type: ignore[import-untyped]
7+
from pytest_lazy_fixtures import lf as lazy_fixture
88
from rest_framework import status
99
from rest_framework.test import APIClient
1010

‎api/tests/integration/features/featurestate/test_environment_featurestate_viewset.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import pytest
44
from django.urls import reverse
5-
from pytest_lazyfixture import lazy_fixture # type: ignore[import-untyped]
5+
from pytest_lazy_fixtures import lf as lazy_fixture
66
from rest_framework import status
77

88

‎api/tests/integration/features/featurestate/test_simple_featurestate_viewset.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import pytest
44
from django.urls import reverse
5-
from pytest_lazyfixture import lazy_fixture # type: ignore[import-untyped]
5+
from pytest_lazy_fixtures import lf as lazy_fixture
66
from rest_framework import status
77

88

‎api/tests/integration/features/featurestate/test_webhooks.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import responses
77
from django.urls import reverse
88
from freezegun import freeze_time
9-
from pytest_lazyfixture import lazy_fixture # type: ignore[import-untyped]
9+
from pytest_lazy_fixtures import lf as lazy_fixture
1010
from pytest_mock import MockerFixture
1111
from rest_framework import status
1212
from rest_framework.test import APIClient

0 commit comments

Comments
 (0)