Skip to content

Commit

Permalink
Bump the python-packages group with 4 updates (#2455)
Browse files Browse the repository at this point in the history
* 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](nedbat/coveragepy@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](astral-sh/ruff@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](pytest-dev/pytest@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](squidfunk/mkdocs-material@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>
  • Loading branch information
dependabot[bot] and Kludex committed Feb 3, 2024
1 parent 4355e6b commit 8da52c2
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 21 deletions.
8 changes: 4 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
37 changes: 20 additions & 17 deletions tests/test_routing.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 8da52c2

Please sign in to comment.