From 087fb0ee76a5c60084e75da26a3c02d61c7c3115 Mon Sep 17 00:00:00 2001 From: Sascha Kreutz Date: Wed, 26 Nov 2025 11:21:57 +0100 Subject: [PATCH] fix: do not add dependency on urllib3 if not required --- .../src/main/resources/python/pyproject.mustache | 4 ++++ .../src/main/resources/python/requirements.mustache | 2 ++ .../src/main/resources/python/setup.mustache | 2 ++ 3 files changed, 8 insertions(+) diff --git a/modules/openapi-generator/src/main/resources/python/pyproject.mustache b/modules/openapi-generator/src/main/resources/python/pyproject.mustache index 6cd7936be558..7eed997a3f43 100644 --- a/modules/openapi-generator/src/main/resources/python/pyproject.mustache +++ b/modules/openapi-generator/src/main/resources/python/pyproject.mustache @@ -33,7 +33,9 @@ include = ["{{packageName}}/py.typed"] [tool.poetry.dependencies] python = "^3.9" +{{^async}} urllib3 = ">= 2.1.0, < 3.0.0" +{{/async}} python-dateutil = ">= 2.8.2" {{#asyncio}} aiohttp = ">= 3.8.4" @@ -59,7 +61,9 @@ lazy-imports = ">= 1, < 2" requires-python = ">=3.9" dependencies = [ +{{^async}} "urllib3 (>=2.1.0,<3.0.0)", +{{/async}} "python-dateutil (>=2.8.2)", {{#httpx}} "httpx (>=0.28.1)", diff --git a/modules/openapi-generator/src/main/resources/python/requirements.mustache b/modules/openapi-generator/src/main/resources/python/requirements.mustache index ee103eba2d74..aef16e4cb7ad 100644 --- a/modules/openapi-generator/src/main/resources/python/requirements.mustache +++ b/modules/openapi-generator/src/main/resources/python/requirements.mustache @@ -1,4 +1,6 @@ +{{^async}} urllib3 >= 2.1.0, < 3.0.0 +{{/async}} python_dateutil >= 2.8.2 {{#asyncio}} aiohttp >= 3.8.4 diff --git a/modules/openapi-generator/src/main/resources/python/setup.mustache b/modules/openapi-generator/src/main/resources/python/setup.mustache index b4589687b173..d65485b42f90 100644 --- a/modules/openapi-generator/src/main/resources/python/setup.mustache +++ b/modules/openapi-generator/src/main/resources/python/setup.mustache @@ -15,7 +15,9 @@ NAME = "{{{projectName}}}" VERSION = "{{packageVersion}}" PYTHON_REQUIRES = ">= 3.9" REQUIRES = [ +{{^async}} "urllib3 >= 2.1.0, < 3.0.0", +{{/async}} "python-dateutil >= 2.8.2", {{#asyncio}} "aiohttp >= 3.8.4",