]> git.ipfire.org Git - thirdparty/starlette.git/commitdiff
Bump the python-packages group with 4 updates (#2455)
authordependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sat, 3 Feb 2024 08:01:51 +0000 (08:01 +0000)
committerGitHub <noreply@github.com>
Sat, 3 Feb 2024 08:01:51 +0000 (08:01 +0000)
* 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] <support@github.com>
* add deprecation warning

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
requirements.txt
tests/test_routing.py

index 2671a6df16d2dbf7aec7c220bcb621b3601ce444..d864321a65e9e29198e87c61046b44840f229e44 100644 (file)
@@ -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
index 128f06674035895cb3fc5a8d24accae80ebe1c48..dd7083e818e67a623b38f3d69a11dbb9d4dec4cb 100644 (file)
@@ -684,27 +684,30 @@ def test_lifespan_with_on_events(test_client_factory: typing.Callable[..., TestC
         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):