Skip to content

Commit

Permalink
Revert "Update to Uvicorn 0.34.0"
Browse files Browse the repository at this point in the history
This reverts commit 3cdf61e.

After updating from Uvicorn 0.28.1 to Uvicorn >=0.29.0, coverage.py
reports that `inboard.gunicorn_workers.UvicornWorker.callback_notify`
and the test ASGI app (`tests.test_gunicorn_workers.app`) are not being
covered when they actually are covered by the tests. `callback_notify`
runs after the Gunicorn server has started up, and the test ASGI app
is obviously used (otherwise the tests couldn't pass).

Possibly related to the unexpected change in test coverage, coverage.py
is generating less coverage files with Uvicorn >=0.29.0. This could
suggest that some of the subprocesses used in the tests aren't exiting
cleanly or aren't being detected by coverage.py. Signal handling has
changed substantially in Uvicorn >=0.29.0, but those changes haven't
been tested with the workers because Uvicorn doesn't test its workers,
as noted in 35d8d86.

Until the changes to signal handling and test coverage are understood
more clearly, Uvicorn will remain on version 0.28.1.
  • Loading branch information
br3ndonland committed Jan 10, 2025
1 parent c52fd63 commit 346b12a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion inboard/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ class UvicornOptions(TypedDict, total=False):
limit_max_requests: int | None
timeout_keep_alive: int
timeout_graceful_shutdown: int | None
ssl_keyfile: str | PathLike[str] | None
ssl_keyfile: str | None
ssl_certfile: str | PathLike[str] | None
ssl_keyfile_password: str | None
ssl_version: int
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ classifiers = [
]
dependencies = [
"gunicorn==22.0.0",
"uvicorn==0.34.0",
"uvicorn==0.28.1",
]
description = "Docker images and utilities to power your Python APIs and help you ship faster."
dynamic = ["version"]
Expand Down Expand Up @@ -56,12 +56,12 @@ tests = [
"trustme>=1.2,<2",
]
uvicorn-fast = [
"httptools>=0.6.3",
"httptools>=0.5.0",
"uvloop>=0.14.0,!=0.15.0,!=0.15.1; sys_platform != 'win32' and (sys_platform != 'cygwin' and platform_python_implementation != 'PyPy')",
"websockets>=10.4",
]
uvicorn-standard = [
"uvicorn[standard]==0.34.0",
"uvicorn[standard]==0.28.1",
]

[project.urls]
Expand Down

0 comments on commit 346b12a

Please sign in to comment.