From e00e36c5f9dd09bb78a8b3f54f3c7f544ae14b69 Mon Sep 17 00:00:00 2001 From: Richard Bowman Date: Thu, 8 Oct 2026 16:54:57 +0100 Subject: [PATCH 1/2] Update requirements file This should silence the pip audit warnings by updating to the most recent version. --- dev-requirements.txt | 96 ++++++++++++++++++++++---------------------- 1 file changed, 49 insertions(+), 47 deletions(-) diff --git a/dev-requirements.txt b/dev-requirements.txt index 02fd2369..39740097 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -2,6 +2,8 @@ # uv pip compile dev-requirements.in -o dev-requirements.txt -e . # via -r dev-requirements.in +agent-detector==2.0.0 + # via fastapi-cloud-cli alabaster==1.0.0 # via sphinx annotated-doc==0.0.5 @@ -10,7 +12,7 @@ annotated-doc==0.0.5 # typer annotated-types==0.8.0 # via pydantic -anyio==4.14.2 +anyio==4.15.1 # via # httpx # httpx2 @@ -21,7 +23,7 @@ apeye==1.4.1 # via sphinx-toolbox apeye-core==1.1.5 # via apeye -astroid==4.1.2 +astroid==4.3.4 # via sphinx-autoapi attrs==26.1.0 # via @@ -44,18 +46,18 @@ certifi==2026.7.22 # sentry-sdk # sphinx-prompt # sphobjinv -charset-normalizer==3.4.9 +charset-normalizer==3.5.2 # via requests -click==8.4.2 +click==8.5.0 # via # pydoclint # rich-toolkit # uvicorn codespell==2.4.3 # via labthings-fastapi -coverage==7.15.3 +coverage==7.16.2 # via pytest-cov -detect-installer==0.1.0 +detect-installer==0.2.1 # via fastapi-cloud-cli dict2css==0.6.0 # via sphinx-toolbox @@ -90,15 +92,15 @@ fastapi==0.135.4 # via labthings-fastapi fastapi-cli==0.0.32 # via fastapi -fastapi-cloud-cli==0.23.0 +fastapi-cloud-cli==0.26.0 # via fastapi-cli -fastar==0.11.0 +fastar==0.12.0 # via fastapi-cloud-cli -filelock==3.32.2 +filelock==4.0.12 # via # cachecontrol # sphinx-toolbox -flake8==7.3.0 +flake8==7.4.1 # via # flake8-pyproject # flake8-rst @@ -120,7 +122,7 @@ html5lib==1.1 # via sphinx-toolbox httpcore==1.0.9 # via httpx -httpcore2==2.9.1 +httpcore2==2.13.1 # via httpx2 httptools==0.8.0 # via uvicorn @@ -128,9 +130,9 @@ httpx==0.28.1 # via # fastapi # fastapi-cloud-cli -httpx2==2.9.1 +httpx2==2.13.1 # via labthings-fastapi -idna==3.18 +idna==3.20 # via # anyio # apeye-core @@ -141,9 +143,9 @@ idna==3.18 # sphinx-prompt ifaddr==0.2.0 # via zeroconf -imagesize==2.0.0 +imagesize==2.0.1 # via sphinx -iniconfig==2.3.0 +iniconfig==2.3.1 # via pytest itsdangerous==2.2.0 # via fastapi @@ -160,14 +162,14 @@ jsonschema==4.26.0 # sphobjinv jsonschema-specifications==2025.9.1 # via jsonschema -librt==0.13.0 +librt==0.16.0 # via mypy markdown-it-py==3.0.0 # via # mdit-py-plugins # myst-parser # rich -markupsafe==3.0.3 +markupsafe==3.0.4 # via # jinja2 # sphinx-jinja2-compat @@ -177,7 +179,7 @@ mdit-py-plugins==0.6.1 # via myst-parser mdurl==0.1.2 # via markdown-it-py -msgpack==1.2.1 +msgpack==1.2.3 # via cachecontrol mypy==1.20.2 # via labthings-fastapi @@ -189,7 +191,7 @@ natsort==8.4.0 # via domdf-python-tools numpy==2.2.6 # via labthings-fastapi -packaging==26.2 +packaging==26.3 # via # pytest # sphinx @@ -197,32 +199,32 @@ pathspec==1.1.1 # via mypy pillow==12.3.0 # via labthings-fastapi -platformdirs==4.11.0 +platformdirs==4.12.4 # via apeye pluggy==1.6.0 # via # pytest # pytest-cov -pycodestyle==2.14.0 +pycodestyle==2.15.0 # via flake8 -pydantic==2.13.4 +pydantic==2.14.0 # via # fastapi # fastapi-cloud-cli # labthings-fastapi # pydantic-extra-types # pydantic-settings -pydantic-core==2.46.4 +pydantic-core==2.50.0 # via pydantic pydantic-extra-types==2.11.1 # via fastapi -pydantic-settings==2.14.2 +pydantic-settings==2.15.0 # via fastapi -pydoclint==0.9.1 +pydoclint==0.11.0 # via labthings-fastapi -pyflakes==3.4.0 +pyflakes==4.0.3 # via flake8 -pygments==2.20.0 +pygments==2.21.0 # via # flake8-rst-docstrings # pytest @@ -237,9 +239,9 @@ pytest==9.1.1 # pytest-mock pytest-cov==7.1.0 # via labthings-fastapi -pytest-mock==3.15.1 +pytest-mock==3.16.0 # via labthings-fastapi -python-dotenv==1.2.2 +python-dotenv==1.2.4 # via # pydantic-settings # uvicorn @@ -267,11 +269,11 @@ rich==15.0.0 # via # rich-toolkit # typer -rich-toolkit==0.20.3 +rich-toolkit==0.20.6 # via # fastapi-cli # fastapi-cloud-cli -rignore==0.8.0 +rignore==0.8.1 # via fastapi-cloud-cli roman==5.2 # via sphinx-toolbox @@ -281,9 +283,9 @@ rpds-py==0.30.0 # referencing ruamel-yaml==0.19.1 # via sphinx-toolbox -ruff==0.16.1 +ruff==0.16.10 # via labthings-fastapi -sentry-sdk==2.66.1 +sentry-sdk==2.71.0 # via fastapi-cloud-cli shellingham==1.5.4 # via typer @@ -291,7 +293,7 @@ six==1.17.0 # via html5lib snowballstemmer==3.1.1 # via sphinx -soupsieve==2.9.1 +soupsieve==2.10 # via beautifulsoup4 sphinx==8.1.3 # via @@ -305,7 +307,7 @@ sphinx==8.1.3 # sphinx-tabs # sphinx-toolbox # sphinxcontrib-jquery -sphinx-autoapi==3.8.0 +sphinx-autoapi==3.8.1 # via labthings-fastapi sphinx-autodoc-typehints==3.0.1 # via sphinx-toolbox @@ -317,7 +319,7 @@ sphinx-rtd-theme==3.1.0 # via labthings-fastapi sphinx-tabs==3.5.0 # via sphinx-toolbox -sphinx-toolbox==4.3.0 +sphinx-toolbox==4.3.1 # via labthings-fastapi sphinxcontrib-applehelp==2.0.0 # via sphinx @@ -335,13 +337,13 @@ sphinxcontrib-serializinghtml==2.0.0 # via sphinx sphobjinv==2.4 # via labthings-fastapi -starlette==1.3.1 +starlette==1.7.0 # via fastapi tabulate==0.10.0 # via sphinx-toolbox tinycss2==1.5.1 # via dict2css -tomli==2.4.1 +tomli==2.5.0 # via # coverage # fastapi-cli @@ -355,11 +357,11 @@ truststore==0.10.4 # via # httpcore2 # httpx2 -typer==0.27.1 +typer==0.27.3 # via # fastapi-cli # fastapi-cloud-cli -types-jsonschema==4.26.0.20260518 +types-jsonschema==4.26.0.20261006 # via labthings-fastapi typing-extensions==4.16.0 # via @@ -381,30 +383,30 @@ typing-extensions==4.16.0 # starlette # typing-inspection # uvicorn -typing-inspection==0.4.2 +typing-inspection==0.4.4 # via # fastapi # pydantic # pydantic-settings -urllib3==2.7.0 +urllib3==2.8.0 # via # requests # sentry-sdk # sphinx-prompt -uvicorn==0.52.1 +uvicorn==0.54.0 # via # fastapi # fastapi-cli # fastapi-cloud-cli -uvloop==0.22.1 +uvloop==0.23.0 # via uvicorn -watchfiles==1.2.0 +watchfiles==1.3.0 # via uvicorn -webencodings==0.5.1 +webencodings==0.6.1 # via # html5lib # tinycss2 websockets==16.1.1 # via uvicorn -zeroconf==0.150.0 +zeroconf==0.151.5 # via labthings-fastapi From 7d66ccf2b2b2e1004ac8e7ae8012e1a502108cca Mon Sep 17 00:00:00 2001 From: Richard Bowman Date: Tue, 13 Oct 2026 21:28:59 +0100 Subject: [PATCH 2/2] Add a type ignore for a spurious mypy error. `mypy` now flags my dynamic model creation as incorrectly typed. I believe this is very close to the issue seen in: https://github.com/pydantic/pydantic/issues/3585 The solution there was to use a variable typed as `Any` rather than using the argument directly. As that amounts to a stealthy type: ignore statement, I have opted to use an explicit type ignore, with a justification. I think that's clearer. --- src/labthings_fastapi/actions.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/labthings_fastapi/actions.py b/src/labthings_fastapi/actions.py index 31df1122..3e73b116 100644 --- a/src/labthings_fastapi/actions.py +++ b/src/labthings_fastapi/actions.py @@ -827,7 +827,13 @@ def __init__( f"{name}_invocation", __base__=InvocationModel, input=(self.input_model, ...), - output=(Optional[self.output_model], None), + output=(Optional[self.output_model], None), # type: ignore[arg-type] + # mypy spuriously flags this as incorrect. I think this is another + # example of https://github.com/pydantic/pydantic/issues/3585 + # where the `pydantic` lead dev suggests using Any. As that's + # equivalent to adding an ignore, I've just added the ignore, as + # I think it's less confusing than going via a variable that's + # typed as `Any`. ) self.invocation_model.__name__ = f"{name}_invocation"