Skip to content

Commit

Permalink
Merge pull request #1088 from lsst-sqre/u/rra/upgrades
Browse files Browse the repository at this point in the history
Update dependencies, set pytest-asyncio fixture scope
  • Loading branch information
rra authored Sep 10, 2024
2 parents eb07830 + a2a23a8 commit 6768885
Show file tree
Hide file tree
Showing 8 changed files with 1,165 additions and 1,918 deletions.
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.2
rev: v0.6.4
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand All @@ -23,7 +23,7 @@ repos:
args: [-l, '79', -t, py312]

- repo: https://github.com/pre-commit/mirrors-eslint
rev: v9.9.1
rev: v9.10.0
hooks:
- id: eslint
additional_dependencies:
Expand All @@ -32,11 +32,11 @@ repos:
- [email protected]
- [email protected]
- [email protected]
- eslint-config-wesbos@3.2.3
- eslint-config-wesbos@4.3.1
- [email protected]
- eslint-plugin-import@2.29.1
- eslint-plugin-jsx-a11y@6.8.0
- eslint-plugin-import@2.30.0
- eslint-plugin-jsx-a11y@6.10.0
- [email protected]
- eslint-plugin-react@7.34.0
- eslint-plugin-react@7.35.2
- [email protected]
- [email protected]
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ warn_required_dynamic_aliases = true
warn_untyped_fields = true

[tool.pytest.ini_options]
asyncio_default_fixture_loop_scope = "function"
asyncio_mode = "strict"
filterwarnings = [
# Google modules use PyType_Spec in a deprecated way.
Expand Down
526 changes: 263 additions & 263 deletions requirements/dev.txt

Large diffs are not rendered by default.

1,162 changes: 580 additions & 582 deletions requirements/main.txt

Large diffs are not rendered by default.

74 changes: 37 additions & 37 deletions requirements/tox.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ cachetools==5.5.0 \
# via
# -c requirements/main.txt
# tox
certifi==2024.7.4 \
--hash=sha256:5a1e7645bc0ec61a09e26c36f6106dd4cf40c6db3a1fb6352b0244e7fb057c7b \
--hash=sha256:c198e21b1289c2ab85ee4e67bb4b4ef3ead0892059901a8d5b622f24a1101e90
certifi==2024.8.30 \
--hash=sha256:922820b53db7a7257ffbda3f597266d435245903d80737e34f8a45ff3e3230d8 \
--hash=sha256:bec941d2aa8195e248a60b31ff9f0558284cf01a52591ceda73ea9afffd69fd9
# via
# -c requirements/dev.txt
# -c requirements/main.txt
Expand Down Expand Up @@ -127,9 +127,9 @@ docker==7.1.0 \
--hash=sha256:ad8c70e6e3f8926cb8a92619b832b4ea5299e2831c14284663184e200546fa6c \
--hash=sha256:c96b93b7f0a746f9e77d325bcfb87422a3d8bd4f03136ae8a85b37f1898d5fc0
# via tox-docker
filelock==3.15.4 \
--hash=sha256:2207938cbc1844345cb01a5a95524dae30f0ce089eba5b00378295a17e3e90cb \
--hash=sha256:6ca1fffae96225dab4c6eaf1c4f4f28cd2568d3ec2a44e15a08520504de468e7
filelock==3.16.0 \
--hash=sha256:81de9eb8453c769b63369f87f11131a7ab04e367f8d97ad39dc230daa07e3bec \
--hash=sha256:f6ed4c963184f4c84dd5557ce8fece759a3724b37b80c6c4f20a2f63a4dc6609
# via
# tox
# virtualenv
Expand All @@ -148,9 +148,9 @@ packaging==24.1 \
# pyproject-api
# tox
# tox-uv
platformdirs==4.2.2 \
--hash=sha256:2d7a1657e36a80ea911db832a8a6ece5ee53d8de21edd5cc5879af6530b1bfee \
--hash=sha256:38b7b51f512eed9e84a22788b4bce1de17c0adb134d6becb09836e37d8654cd3
platformdirs==4.3.2 \
--hash=sha256:9e5e27a08aa095dd127b9f2e764d74254f482fef22b0970773bfba79d091ab8c \
--hash=sha256:eb1c8582560b34ed4ba105009a4badf7f6f85768b30126f351328507b2beb617
# via
# -c requirements/dev.txt
# tox
Expand Down Expand Up @@ -190,9 +190,9 @@ requests==2.32.3 \
# -c requirements/dev.txt
# -c requirements/main.txt
# docker
tox==4.18.0 \
--hash=sha256:0a457400cf70615dc0627eb70d293e80cd95d8ce174bb40ac011011f0c03a249 \
--hash=sha256:5dfa1cab9f146becd6e351333a82f9e0ade374451630ba65ee54584624c27b58
tox==4.18.1 \
--hash=sha256:35d472032ee1f73fe20c3e0e73d7073a4e85075c86ff02c576f9fc7c6a15a578 \
--hash=sha256:3c0c96bc3a568a5c7e66387a4cfcf8c875b52e09f4d47c9f7a277ec82f1a0b11
# via
# -r requirements/tox.in
# tox-docker
Expand All @@ -201,9 +201,9 @@ tox-docker==5.0.0 \
--hash=sha256:3cbfe70713910b9dbb9f74e20a5c42f19da42d375bac7d6a3ccc11aed0738d7a \
--hash=sha256:7dd7293ea286dff422eab6c23a70652147b275eb436c02e97a90ac59ba41f8a8
# via -r requirements/tox.in
tox-uv==1.11.2 \
--hash=sha256:7f8f1737b3277e1cddcb5b89fcc5931d04923562c940ae60f29e140908566df2 \
--hash=sha256:a7aded5c3fb69f055b523357988c1055bb573e91bfd7ecfb9b5233ebcab5d10b
tox-uv==1.11.3 \
--hash=sha256:316f559ae5525edec12791d9e1f393e405ded5b7e7d50fbaee4726676951f49a \
--hash=sha256:d434787406ff2854600c1ceaa555519080026208cf7f65bb5d4b2d7c9c4776de
# via -r requirements/tox.in
urllib3==2.2.2 \
--hash=sha256:a448b2f64d686155468037e1ace9f2d2199776e17f0a46610480d311f73e3472 \
Expand All @@ -213,27 +213,27 @@ urllib3==2.2.2 \
# -c requirements/main.txt
# docker
# requests
uv==0.3.5 \
--hash=sha256:07bd680a570245c44da0800bed98ef01bfed6549832ae3b364e9c289afa6f76b \
--hash=sha256:1ef68f64a9232cb71a46f33b506ce14cb31c54d5385d47ee1202f17d300e40df \
--hash=sha256:420cabd5fa42f23e3abd0a4e43e3e84af9790f8c847b4306b7325a882356f94c \
--hash=sha256:47faf95c3da64c3a819cc3e5b7d660d990c01ec248a588848426c4ab1e40bcb2 \
--hash=sha256:4c89dd183389c297393b203172e9d72e7d2f2309eead950c9749240700817e98 \
--hash=sha256:4f379d8748020ed8233a6681dcbb26e79eb8a8a7310d2dbd1e0de04e780c18ba \
--hash=sha256:585a91a05250e2d800f7614e77c09ba16fa1d3014ec092dac05ec2ea232d489f \
--hash=sha256:59f10007b4c52ed132e6a87fc39f487dfec90835b46678365f4f3e67caab3c02 \
--hash=sha256:7eb2e8bba1301efe43f929c33ba1c49975d314028feba4ec91d3da633629c74e \
--hash=sha256:7fffe2e209c7059522b3221d940356b24dc8036bcde2801de081e7e9c5cc5c4a \
--hash=sha256:80243b411ce791d1c2656d148d9d2e3553cd71eb9812ed559a3f1c1384afb571 \
--hash=sha256:89c1515200a838014b1fa6c9cfb2b9a055bcad3178ccf7d31768bf38b43cac65 \
--hash=sha256:8a95ec9d9dcd3aad62c4a64d087ce953c2f733b27c50793c022bcc3cb9b17d92 \
--hash=sha256:9190ac2266076e6c63d3113bca5d047742e90406d763bf9ba5db7bac9ab9e4a5 \
--hash=sha256:cac04fce16fed8d7626dcd32b9e07c0475eb0266f858328f2de398802c1fc9af \
--hash=sha256:cdab52c5c1ed97805f2b4d7648615e10a823f8c5497207d5f14f5b6062c4798b \
--hash=sha256:e1dac7bd4ca2bd6d11ed4e43523e040ef9ed1cde2cd376eb6b1c61e64f636e95 \
--hash=sha256:e7b8f8e35e6f8245dc7831b499dd6b7a71d94b6862b8225f2245fb59ef4f9825
uv==0.4.7 \
--hash=sha256:00aa7299edefcc4069d73b988a7331d590e3fedd29f5695b1680905af1ccba04 \
--hash=sha256:0fef80011c96dc8e284f4895b7ca92945e450fb517872115a557e72789c0e2c5 \
--hash=sha256:106fc5449a63137da6b3c4fd25775e3eeda3b11c8cea12439d95201237a95484 \
--hash=sha256:1357fb27047cff94422bb82cf9a82d7285ce8341a204fc1925b0b89c8d108249 \
--hash=sha256:23283699e6035ef536b204f9094e7297093a527f958b86d4ce26613c603f564c \
--hash=sha256:2ab5f6701046b373cdedca7334e20a8dc7726eb4c3e2f6e18297dbbda09afba9 \
--hash=sha256:319a585f53c0b63b989526206383716e1d7c0f3483425058b94bf47402a81841 \
--hash=sha256:54c3dde3c01d96fba484c2728e020c7c867e05a88de143ddb6df1091d1ffdfb7 \
--hash=sha256:63b59e0cfa303a97ce5ba19fa8fc27a6339516561bc4b821cca52ed15721cbdb \
--hash=sha256:904763380be165f5213dcbacb8d6c17d5cf138ea4bd24b4a37a1b6046b5650a1 \
--hash=sha256:9356449439d4fa42419d17736d775cd1701b1b4a054ab445faf1477a6920a505 \
--hash=sha256:a1850d93f78eeb6d0ace3dc0335e1bf141a4b6a26844ab75f00055de2a4817cd \
--hash=sha256:ab7308c0604268f21b1a5bce4e1b61bcf56831f4aef59bee93c2b5815f4bc6a8 \
--hash=sha256:bfbd6e28b0543b774db7d97d61963c384c70284e95056004c8f74252e69616c7 \
--hash=sha256:d6c8e43bbdfa2f7910245335acb93fcb5a4e34995b7ce60de4e814071690b3c5 \
--hash=sha256:e1f3285bebfeab6e076e651ec47f6adf7a83a4f014dd9d7e73efc034e77d42cd \
--hash=sha256:e8bc35e30f2bb03f0e1812f1c0dce0e73d8ab01e90392d39f334da9d75e522b0 \
--hash=sha256:ec49a00317799226d33135bf40e8da44262f44e3980a5bb9e6dae7250523c963
# via tox-uv
virtualenv==20.26.3 \
--hash=sha256:4c43a2a236279d9ea36a0d76f98d84bd6ca94ac4e0f4a3b9d46d05e10fea542a \
--hash=sha256:8cc4a31139e796e9a7de2cd5cf2489de1217193116a8fd42328f1bd65f434589
virtualenv==20.26.4 \
--hash=sha256:48f2695d9809277003f30776d155615ffc11328e6a0a8c1f0ec80188d7874a55 \
--hash=sha256:c17f4e0f3e6036e9f26700446f85c76ab11df65ff6d8a9cbfad9f71aabfcf23c
# via tox
2 changes: 1 addition & 1 deletion tests/handlers/auth_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ async def test_invalid(
"/auth", headers={"Authorization": f"bearer {token.token}"}
)
assert r.status_code == 422
assert r.json()["detail"][0]["type"] == "list_type"
assert r.json()["detail"][0]["type"] == "missing"

r = await client.get(
"/auth",
Expand Down
8 changes: 4 additions & 4 deletions tests/operator/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,24 @@
]


@pytest_asyncio.fixture(scope="session")
@pytest_asyncio.fixture(loop_scope="session", scope="session", autouse=True)
async def kubernetes_setup() -> None:
"""Initialize the Kubernetes client and install the testing CRDs.
Notes
-----
This needs to be done as a session fixture, since deleting CRDs between
tests doesn't really work. Even if one waits for the CRD to be deleted,
tests doesn't really work. Even if one waits for the CRD to be deleted,
Kubernetes still won't allow it to be reinstalled, failing with a 409
Conflict error. Presumably it lives on for longer than we want to wait.
Conflict error. Presumably it lives on for longer than we want to wait.
"""
await initialize_kubernetes()
async with ApiClient() as api_client:
await install_crds(api_client)


@pytest_asyncio.fixture
async def api_client(kubernetes_setup: None) -> AsyncIterator[ApiClient]:
async def api_client() -> AsyncIterator[ApiClient]:
"""Set up a Kubernetes environment and clean up after a test."""
async with ApiClient() as client:
yield client
Expand Down
Loading

0 comments on commit 6768885

Please sign in to comment.