From 8da52c2243b8855426c40c16ae24b27734824078 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 3 Feb 2024 08:01:51 +0000 Subject: [PATCH] Bump the python-packages group with 4 updates (#2455) * Bump the python-packages group with 4 updates Bumps the python-packages group with 4 updates: [coverage](https://github.com/nedbat/coveragepy), [ruff](https://github.com/astral-sh/ruff), [pytest](https://github.com/pytest-dev/pytest) and [mkdocs-material](https://github.com/squidfunk/mkdocs-material). Updates `coverage` from 7.4.0 to 7.4.1 - [Release notes](https://github.com/nedbat/coveragepy/releases) - [Changelog](https://github.com/nedbat/coveragepy/blob/master/CHANGES.rst) - [Commits](https://github.com/nedbat/coveragepy/compare/7.4.0...7.4.1) Updates `ruff` from 0.1.13 to 0.1.15 - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/v0.1.13...v0.1.15) Updates `pytest` from 7.4.4 to 8.0.0 - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/7.4.4...8.0.0) Updates `mkdocs-material` from 9.5.5 to 9.5.6 - [Release notes](https://github.com/squidfunk/mkdocs-material/releases) - [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG) - [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.5.5...9.5.6) --- updated-dependencies: - dependency-name: coverage dependency-type: direct:production update-type: version-update:semver-patch dependency-group: python-packages - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch dependency-group: python-packages - dependency-name: pytest dependency-type: direct:production update-type: version-update:semver-major dependency-group: python-packages - dependency-name: mkdocs-material dependency-type: direct:production update-type: version-update:semver-patch dependency-group: python-packages ... Signed-off-by: dependabot[bot] * add deprecation warning --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Marcelo Trylesinski --- requirements.txt | 8 ++++---- tests/test_routing.py | 37 ++++++++++++++++++++----------------- 2 files changed, 24 insertions(+), 21 deletions(-) diff --git a/requirements.txt b/requirements.txt index 2671a6df1..d864321a6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,20 +2,20 @@ -e .[full] # Testing -coverage==7.4.0 +coverage==7.4.1 importlib-metadata==7.0.1 mypy==1.8.0 -ruff==0.1.13 +ruff==0.1.15 typing_extensions==4.9.0 types-contextvars==2.4.7.3 types-PyYAML==6.0.12.12 types-dataclasses==0.6.6 -pytest==7.4.4 +pytest==8.0.0 trio==0.24.0 # Documentation mkdocs==1.5.3 -mkdocs-material==9.5.5 +mkdocs-material==9.5.6 mkautodoc==0.2.0 # Packaging diff --git a/tests/test_routing.py b/tests/test_routing.py index 128f06674..dd7083e81 100644 --- a/tests/test_routing.py +++ b/tests/test_routing.py @@ -684,27 +684,30 @@ def run_shutdown(): # pragma: no cover nonlocal shutdown_called shutdown_called = True - with pytest.warns( - UserWarning, - match=( - "The `lifespan` parameter cannot be used with `on_startup` or `on_shutdown`." # noqa: E501 - ), + with pytest.deprecated_call( + match="The on_startup and on_shutdown parameters are deprecated" ): - app = Router( - on_startup=[run_startup], on_shutdown=[run_shutdown], lifespan=lifespan - ) + with pytest.warns( + UserWarning, + match=( + "The `lifespan` parameter cannot be used with `on_startup` or `on_shutdown`." # noqa: E501 + ), + ): + app = Router( + on_startup=[run_startup], on_shutdown=[run_shutdown], lifespan=lifespan + ) - assert not lifespan_called - assert not startup_called - assert not shutdown_called + assert not lifespan_called + assert not startup_called + assert not shutdown_called - # Triggers the lifespan events - with test_client_factory(app): - ... + # Triggers the lifespan events + with test_client_factory(app): + ... - assert lifespan_called - assert not startup_called - assert not shutdown_called + assert lifespan_called + assert not startup_called + assert not shutdown_called def test_lifespan_sync(test_client_factory):