From: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Nov 2024 20:19:15 +0000 (+0100) Subject: Bump the python-packages group with 6 updates (#2743) X-Git-Tag: 0.42.0~17 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=530cbf63f73e1bd0bddfa4f7325c224f5f2b9098;p=thirdparty%2Fstarlette.git Bump the python-packages group with 6 updates (#2743) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Marcelo Trylesinski --- diff --git a/requirements.txt b/requirements.txt index a808c908..1dc7bc7c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,20 +4,20 @@ # Testing coverage==7.6.1 importlib-metadata==8.5.0 -mypy==1.11.2 -ruff==0.6.8 +mypy==1.13.0 +ruff==0.7.2 typing_extensions==4.12.2 types-contextvars==2.4.7.3 types-PyYAML==6.0.12.20240917 types-dataclasses==0.6.6 pytest==8.3.3 -trio==0.26.2 +trio==0.27.0 # Documentation mkdocs==1.6.1 -mkdocs-material==9.5.39 +mkdocs-material==9.5.43 mkautodoc==0.2.0 # Packaging -build==1.2.2 +build==1.2.2.post1 twine==5.1.1 diff --git a/starlette/concurrency.py b/starlette/concurrency.py index ce3f5c82..494f3420 100644 --- a/starlette/concurrency.py +++ b/starlette/concurrency.py @@ -33,10 +33,8 @@ async def run_until_first_complete(*args: tuple[typing.Callable, dict]) -> None: async def run_in_threadpool(func: typing.Callable[P, T], *args: P.args, **kwargs: P.kwargs) -> T: - if kwargs: # pragma: no cover - # run_sync doesn't accept 'kwargs', so bind them in here - func = functools.partial(func, **kwargs) - return await anyio.to_thread.run_sync(func, *args) + func = functools.partial(func, *args, **kwargs) + return await anyio.to_thread.run_sync(func) class _StopIteration(Exception):