Skip to content

Commit

Permalink
Update to Uvicorn 0.25.0
Browse files Browse the repository at this point in the history
This commit will update/upgrade to
[Uvicorn 0.25.0](https://github.com/encode/uvicorn/releases).

Uvicorn 0.25.0 adds support for the WebSocket Denial Response ASGI
extension. This is used in certain cases in which a WebSocket app needs
to reject a connection and return a custom response.

Uvicorn 0.25.0 also includes some corrections to the type annotations on
`uvicorn.run()`. `inboard.types.UvicornOptions` already included correct
type annotations that match these corrections, so no changes are needed.
  • Loading branch information
br3ndonland committed Dec 31, 2023
1 parent a1cfb84 commit 4cc018b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
8 changes: 3 additions & 5 deletions inboard/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,9 @@ class UvicornOptions(TypedDict, total=False):
the same ([encode/uvicorn#1545]). This type is primarily intended to match the
arguments to `uvicorn.run()`.
The `app` argument to `uvicorn.run()` accepts an un-parametrized `Callable`
because Uvicorn tests use callables ([encode/uvicorn#1067]). It is not
necessary for other packages to accept `Callable`, and it would need to be
parametrized to pass mypy strict mode anyway. For these reasons, `Callable`
is not accepted in the `app` field of this type.
The `app` argument to `uvicorn.run()` accepts a `Callable` because Uvicorn tests use
callables ([encode/uvicorn#1067]). It is not necessary for other packages to accept
`Callable`, so `Callable` is not accepted in the `app` field of this type.
The `log_config` argument in this type uses the inboard `DictConfig` type
instead of `dict[str, Any]` for stricter type checking.
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ classifiers = [
]
dependencies = [
"gunicorn==20.1.0",
"uvicorn==0.24.0",
"uvicorn==0.25.0",
]
description = "Docker images and utilities to power your Python APIs and help you ship faster."
dynamic = ["version"]
Expand Down Expand Up @@ -61,7 +61,7 @@ uvicorn-fast = [
"websockets>=10.4",
]
uvicorn-standard = [
"uvicorn[standard]==0.24.0",
"uvicorn[standard]==0.25.0",
]

[project.urls]
Expand Down

0 comments on commit 4cc018b

Please sign in to comment.