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", diff --git a/samples/openapi3/client/petstore/python-aiohttp/pyproject.toml b/samples/openapi3/client/petstore/python-aiohttp/pyproject.toml index fbafbe1e07a2..8e03a6c82feb 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/pyproject.toml +++ b/samples/openapi3/client/petstore/python-aiohttp/pyproject.toml @@ -11,7 +11,6 @@ include = ["petstore_api/py.typed"] [tool.poetry.dependencies] python = "^3.9" -urllib3 = ">= 2.1.0, < 3.0.0" python-dateutil = ">= 2.8.2" aiohttp = ">= 3.8.4" aiohttp-retry = ">= 2.8.3" diff --git a/samples/openapi3/client/petstore/python-aiohttp/requirements.txt b/samples/openapi3/client/petstore/python-aiohttp/requirements.txt index 76b1f7272d19..add57040b437 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/requirements.txt +++ b/samples/openapi3/client/petstore/python-aiohttp/requirements.txt @@ -1,4 +1,3 @@ -urllib3 >= 2.1.0, < 3.0.0 python_dateutil >= 2.8.2 aiohttp >= 3.8.4 aiohttp-retry >= 2.8.3 diff --git a/samples/openapi3/client/petstore/python-aiohttp/setup.py b/samples/openapi3/client/petstore/python-aiohttp/setup.py index eab7be21eea2..93a557bdcaa9 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/setup.py +++ b/samples/openapi3/client/petstore/python-aiohttp/setup.py @@ -24,7 +24,6 @@ VERSION = "1.0.0" PYTHON_REQUIRES = ">= 3.9" REQUIRES = [ - "urllib3 >= 2.1.0, < 3.0.0", "python-dateutil >= 2.8.2", "aiohttp >= 3.8.4", "aiohttp-retry >= 2.8.3", diff --git a/samples/openapi3/client/petstore/python-aiohttp/tests/test_pet_api.py b/samples/openapi3/client/petstore/python-aiohttp/tests/test_pet_api.py index ad2c397d05e1..2d4f64f4f38c 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/tests/test_pet_api.py +++ b/samples/openapi3/client/petstore/python-aiohttp/tests/test_pet_api.py @@ -24,7 +24,6 @@ import json -import urllib3 HOST = 'http://localhost:80/v2' diff --git a/samples/openapi3/client/petstore/python-httpx/pyproject.toml b/samples/openapi3/client/petstore/python-httpx/pyproject.toml index 6ed9055b00f6..17720c14e8c2 100644 --- a/samples/openapi3/client/petstore/python-httpx/pyproject.toml +++ b/samples/openapi3/client/petstore/python-httpx/pyproject.toml @@ -11,7 +11,6 @@ keywords = ["OpenAPI", "OpenAPI-Generator", "OpenAPI Petstore"] requires-python = ">=3.9" dependencies = [ - "urllib3 (>=2.1.0,<3.0.0)", "python-dateutil (>=2.8.2)", "httpx (>=0.28.1)", "pem (>=19.3.0)", diff --git a/samples/openapi3/client/petstore/python-httpx/requirements.txt b/samples/openapi3/client/petstore/python-httpx/requirements.txt index 373d131abd07..47ae4aa20eac 100644 --- a/samples/openapi3/client/petstore/python-httpx/requirements.txt +++ b/samples/openapi3/client/petstore/python-httpx/requirements.txt @@ -1,4 +1,3 @@ -urllib3 >= 2.1.0, < 3.0.0 python_dateutil >= 2.8.2 httpx = ">= 0.28.1" pem >= 19.3.0 diff --git a/samples/openapi3/client/petstore/python-httpx/setup.py b/samples/openapi3/client/petstore/python-httpx/setup.py index 36a30666aaaa..e9883ecf3ccc 100644 --- a/samples/openapi3/client/petstore/python-httpx/setup.py +++ b/samples/openapi3/client/petstore/python-httpx/setup.py @@ -24,7 +24,6 @@ VERSION = "1.0.0" PYTHON_REQUIRES = ">= 3.9" REQUIRES = [ - "urllib3 >= 2.1.0, < 3.0.0", "python-dateutil >= 2.8.2", "httpx >= 0.28.1", "pem >= 19.3.0",