kaxil opened a new pull request, #76856: URL: https://github.com/apache/airflow/pull/76856
uvicorn deprecated `uvicorn.workers` in favour of the separate [`uvicorn-worker`](https://github.com/Kludex/uvicorn-worker) package, and the module emits a `DeprecationWarning` on import. Every API server started with `[api] server_type = gunicorn` logs it: ``` [warning ] The `uvicorn.workers` module is deprecated. Please use `uvicorn-worker` package instead. For more details, see https://github.com/Kludex/uvicorn-worker. [py.warnings] category=DeprecationWarning filename=.../uvicorn/workers.py lineno=17 ``` This imports `UvicornWorker` from `uvicorn_worker` and adds `uvicorn-worker>=0.4.0` to the `gunicorn` extra. The `UvicornWorker` class in uvicorn-worker 0.4.0 is the same code as in uvicorn 0.54.0 (the locked version) apart from comment URLs, so `AirflowUvicornWorker`'s `CONFIG_KWARGS` override and worker behaviour are unchanged. uvicorn-worker 0.4.0 needs `uvicorn>=0.36.0` and `gunicorn>=21.0.0`, both below our floors; `uv.lock` gains only that one package. The startup check for `server_type = gunicorn` also tries `import uvicorn_worker` now, so an install with bare `gunicorn` but without the extra gets the existing "install `apache-airflow-core[gunicorn]`" error rather than a `ModuleNotFoundError` from deep in startup. Started `airflow api-server` with `AIRFLOW__API__SERVER_TYPE=gunicorn` and two workers in breeze: gunicorn 26.2.0 boots `airflow.api_fastapi.gunicorn_app.AirflowUvicornWorker`, `/api/v2/monitor/health` answers, and the log has no `uvicorn.workers` deprecation line (it had one before). **Gotcha:** the `gunicorn` extra gains a member. Anyone who installed `gunicorn` directly, or upgrades `apache-airflow-core` without requesting `[gunicorn]` again, gets the config error above on startup until they reinstall with the extra. Happy to add a `significant` newsfragment if reviewers think that warrants one. closes: #76844 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
