From d8c34c6a01f0547d6baa939a5c7e3edb026c6601 Mon Sep 17 00:00:00 2001 From: James Addison Date: Fri, 5 Jun 2026 16:56:48 +0100 Subject: [PATCH] chore: minimise dependency on `packaging` The Python package named `packaging` is only required as a runtime dependency by the `gevent` worker of `gunicorn`; in other words, we do not need to install it as a dependency for installations of other worker types. This changeset relocates the `packaging` requirement from the default dependencies for `gunicorn` to the `gevent` extras set (and also the `requirements_test.txt` requirements file, so that it is available when the unit tests run). --- pyproject.toml | 9 +++++---- requirements_test.txt | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index eec373958..641f69316 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -34,9 +34,6 @@ classifiers = [ "Topic :: Internet :: WWW/HTTP :: Dynamic Content", ] requires-python = ">=3.10" -dependencies = [ - "packaging", -] dynamic = ["version"] [project.urls] @@ -47,7 +44,10 @@ Documentation = "https://gunicorn.org" Changelog = "https://gunicorn.org/news/" [project.optional-dependencies] -gevent = ["gevent>=24.10.1"] +gevent = [ + "gevent>=24.10.1", + "packaging", +] tornado = ["tornado>=6.5.0"] gthread = [] setproctitle = ["setproctitle"] @@ -57,6 +57,7 @@ testing = [ "gevent>=24.10.1", "h2>=4.1.0", "coverage", + "packaging", "pytest", "pytest-cov", "pytest-asyncio", diff --git a/requirements_test.txt b/requirements_test.txt index 6ac192f50..f245ceb6c 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -1,5 +1,6 @@ gevent coverage +packaging pytest>=7.2.0 pytest-cov pytest-asyncio