chore(deps): migrate to uvicorn-worker, silence deprecation - #96
Merged
Salil Das (sadlilas) merged 2 commits intoSep 1, 2026
Merged
Conversation
Added uvicorn-worker>=0.4.0 to pyproject.toml (uvicorn 0.41.0 and gunicorn 25.1.0 unchanged in uv.lock). Swapped gunicorn worker_class from uvicorn.workers.UvicornWorker to uvicorn_worker.UvicornWorker. Updated test references and stale worker import paths in codebase. No behavior change — dependency add + internal reference swap only. 🤖 Generated with Amplifier Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>
The uvicorn-worker rename only required updating the class name in the _THIRD_PARTY_LOGGER_NAMES comment. Restore the full boundary note from bb420e2 - the enumerated plain-text startup lines and the pointer to gunicorn's --log-config / logconfig_dict - which is the only record of that behaviour in the repo.
Salil Das (sadlilas)
approved these changes
Sep 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migration: Uvicorn Worker Dependency
Moves the Gunicorn worker off the deprecated
uvicorn.workersmodule to the separateuvicorn-workerpackage, which is where uvicorn's own deprecation warning points.Changes:
uvicorn-worker>=0.4.0topyproject.tomlanduv.lockworker_classfromuvicorn.workers.UvicornWorkertouvicorn_worker.UvicornWorkerWhy this is a no-op at runtime:
uvicorn/workers.pyanduvicorn_worker/_workers.pyare identical apart from a license header, the deprecation warning itself, and two URLs inside comments. The worker class, its config construction, signal handling, and serve loop are the same code.Where the deprecation actually surfaced: in the test suite. Gunicorn imports the worker class outside
__main__, so Python's default warning filters suppress it in a normal server run. This removes the warning from pytest output and gets ahead of uvicorn eventually removing the module.Verification:
uv sync --frozensucceeds (lockfile is consistent)uvicorn_worker.UvicornWorkerthrough its real config path, with no DeprecationWarningruff checkcleanuvicorn.workersreferences remain anywhere in the repo