From 448cbfd018f5710f3f3e29e7393fab5c26e1b220 Mon Sep 17 00:00:00 2001 From: Robert Schweizer Date: Wed, 12 Apr 2023 05:08:28 +0200 Subject: [PATCH] [python-nextgen] Limit allowed pydantic version range (#15189) Align the lower limits between pyproject.toml and setup.py. Set a common upper limit of <2, because version 2 brings breaking changes. --- .../src/main/resources/python-nextgen/pyproject.mustache | 2 +- .../src/main/resources/python-nextgen/requirements.mustache | 2 +- .../src/main/resources/python-nextgen/setup.mustache | 2 +- samples/client/echo_api/python-nextgen/pyproject.toml | 2 +- samples/client/echo_api/python-nextgen/requirements.txt | 2 +- samples/client/echo_api/python-nextgen/setup.py | 2 +- .../client/petstore/python-nextgen-aiohttp/pyproject.toml | 2 +- .../client/petstore/python-nextgen-aiohttp/requirements.txt | 2 +- .../openapi3/client/petstore/python-nextgen-aiohttp/setup.py | 2 +- samples/openapi3/client/petstore/python-nextgen/pyproject.toml | 2 +- .../openapi3/client/petstore/python-nextgen/requirements.txt | 2 +- samples/openapi3/client/petstore/python-nextgen/setup.py | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/python-nextgen/pyproject.mustache b/modules/openapi-generator/src/main/resources/python-nextgen/pyproject.mustache index ce0db200000..1ab024d87f2 100644 --- a/modules/openapi-generator/src/main/resources/python-nextgen/pyproject.mustache +++ b/modules/openapi-generator/src/main/resources/python-nextgen/pyproject.mustache @@ -23,7 +23,7 @@ tornado = ">=4.2,<5" pem = ">= 19.3.0" pycryptodome = ">= 3.9.0" {{/hasHttpSignatureMethods}} -pydantic = ">= 1.10.5" +pydantic = "^1.10.5" aenum = ">=3.1.11" [tool.poetry.dev-dependencies] diff --git a/modules/openapi-generator/src/main/resources/python-nextgen/requirements.mustache b/modules/openapi-generator/src/main/resources/python-nextgen/requirements.mustache index b64659a0a91..e18a97e55fd 100644 --- a/modules/openapi-generator/src/main/resources/python-nextgen/requirements.mustache +++ b/modules/openapi-generator/src/main/resources/python-nextgen/requirements.mustache @@ -1,7 +1,7 @@ python_dateutil >= 2.5.3 setuptools >= 21.0.0 urllib3 >= 1.25.3 -pydantic >= 1.10.2 +pydantic >= 1.10.5, < 2 aenum >= 3.1.11 {{#asyncio}} aiohttp >= 3.0.0 diff --git a/modules/openapi-generator/src/main/resources/python-nextgen/setup.mustache b/modules/openapi-generator/src/main/resources/python-nextgen/setup.mustache index 77760324f82..902163a1e1d 100644 --- a/modules/openapi-generator/src/main/resources/python-nextgen/setup.mustache +++ b/modules/openapi-generator/src/main/resources/python-nextgen/setup.mustache @@ -29,7 +29,7 @@ REQUIRES = [ "pem>=19.3.0", "pycryptodome>=3.9.0", {{/hasHttpSignatureMethods}} - "pydantic", + "pydantic >= 1.10.5, < 2", "aenum" ] diff --git a/samples/client/echo_api/python-nextgen/pyproject.toml b/samples/client/echo_api/python-nextgen/pyproject.toml index 954dc0de05a..0a22d86748b 100644 --- a/samples/client/echo_api/python-nextgen/pyproject.toml +++ b/samples/client/echo_api/python-nextgen/pyproject.toml @@ -13,7 +13,7 @@ python = "^3.7" urllib3 = ">= 1.25.3" python-dateutil = ">=2.8.2" -pydantic = ">= 1.10.5" +pydantic = "^1.10.5" aenum = ">=3.1.11" [tool.poetry.dev-dependencies] diff --git a/samples/client/echo_api/python-nextgen/requirements.txt b/samples/client/echo_api/python-nextgen/requirements.txt index b98ff3e6069..74ede174a0a 100644 --- a/samples/client/echo_api/python-nextgen/requirements.txt +++ b/samples/client/echo_api/python-nextgen/requirements.txt @@ -1,5 +1,5 @@ python_dateutil >= 2.5.3 setuptools >= 21.0.0 urllib3 >= 1.25.3 -pydantic >= 1.10.2 +pydantic >= 1.10.5, < 2 aenum >= 3.1.11 diff --git a/samples/client/echo_api/python-nextgen/setup.py b/samples/client/echo_api/python-nextgen/setup.py index 004666ab677..3915ce5c373 100644 --- a/samples/client/echo_api/python-nextgen/setup.py +++ b/samples/client/echo_api/python-nextgen/setup.py @@ -27,7 +27,7 @@ PYTHON_REQUIRES = ">=3.7" REQUIRES = [ "urllib3 >= 1.25.3", "python-dateutil", - "pydantic", + "pydantic >= 1.10.5, < 2", "aenum" ] diff --git a/samples/openapi3/client/petstore/python-nextgen-aiohttp/pyproject.toml b/samples/openapi3/client/petstore/python-nextgen-aiohttp/pyproject.toml index 981eebf3c59..6c4548406a1 100644 --- a/samples/openapi3/client/petstore/python-nextgen-aiohttp/pyproject.toml +++ b/samples/openapi3/client/petstore/python-nextgen-aiohttp/pyproject.toml @@ -16,7 +16,7 @@ python-dateutil = ">=2.8.2" aiohttp = ">= 3.8.4" pem = ">= 19.3.0" pycryptodome = ">= 3.9.0" -pydantic = ">= 1.10.5" +pydantic = "^1.10.5" aenum = ">=3.1.11" [tool.poetry.dev-dependencies] diff --git a/samples/openapi3/client/petstore/python-nextgen-aiohttp/requirements.txt b/samples/openapi3/client/petstore/python-nextgen-aiohttp/requirements.txt index 1365d507af1..8bb00c2c243 100644 --- a/samples/openapi3/client/petstore/python-nextgen-aiohttp/requirements.txt +++ b/samples/openapi3/client/petstore/python-nextgen-aiohttp/requirements.txt @@ -1,6 +1,6 @@ python_dateutil >= 2.5.3 setuptools >= 21.0.0 urllib3 >= 1.25.3 -pydantic >= 1.10.2 +pydantic >= 1.10.5, < 2 aenum >= 3.1.11 aiohttp >= 3.0.0 diff --git a/samples/openapi3/client/petstore/python-nextgen-aiohttp/setup.py b/samples/openapi3/client/petstore/python-nextgen-aiohttp/setup.py index 9d2c0b75b55..d584a44727d 100644 --- a/samples/openapi3/client/petstore/python-nextgen-aiohttp/setup.py +++ b/samples/openapi3/client/petstore/python-nextgen-aiohttp/setup.py @@ -29,7 +29,7 @@ REQUIRES = [ "aiohttp >= 3.0.0", "pem>=19.3.0", "pycryptodome>=3.9.0", - "pydantic", + "pydantic >= 1.10.5, < 2", "aenum" ] diff --git a/samples/openapi3/client/petstore/python-nextgen/pyproject.toml b/samples/openapi3/client/petstore/python-nextgen/pyproject.toml index 82e111dd60f..b31e8940819 100644 --- a/samples/openapi3/client/petstore/python-nextgen/pyproject.toml +++ b/samples/openapi3/client/petstore/python-nextgen/pyproject.toml @@ -15,7 +15,7 @@ urllib3 = ">= 1.25.3" python-dateutil = ">=2.8.2" pem = ">= 19.3.0" pycryptodome = ">= 3.9.0" -pydantic = ">= 1.10.5" +pydantic = "^1.10.5" aenum = ">=3.1.11" [tool.poetry.dev-dependencies] diff --git a/samples/openapi3/client/petstore/python-nextgen/requirements.txt b/samples/openapi3/client/petstore/python-nextgen/requirements.txt index b98ff3e6069..74ede174a0a 100755 --- a/samples/openapi3/client/petstore/python-nextgen/requirements.txt +++ b/samples/openapi3/client/petstore/python-nextgen/requirements.txt @@ -1,5 +1,5 @@ python_dateutil >= 2.5.3 setuptools >= 21.0.0 urllib3 >= 1.25.3 -pydantic >= 1.10.2 +pydantic >= 1.10.5, < 2 aenum >= 3.1.11 diff --git a/samples/openapi3/client/petstore/python-nextgen/setup.py b/samples/openapi3/client/petstore/python-nextgen/setup.py index e1bff332d2b..10a96353933 100755 --- a/samples/openapi3/client/petstore/python-nextgen/setup.py +++ b/samples/openapi3/client/petstore/python-nextgen/setup.py @@ -28,7 +28,7 @@ REQUIRES = [ "python-dateutil", "pem>=19.3.0", "pycryptodome>=3.9.0", - "pydantic", + "pydantic >= 1.10.5, < 2", "aenum" ]