From a0cc3f0e8b559f7476920ee3f89f451aa5e4aed8 Mon Sep 17 00:00:00 2001 From: Youri Westerman Date: Tue, 10 Jun 2025 12:11:06 +0200 Subject: [PATCH 1/7] Validate pyproject.toml of echo client python sample --- .../workflows/samples-python-client-echo-api.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/samples-python-client-echo-api.yaml b/.github/workflows/samples-python-client-echo-api.yaml index b90c25db1b9c..95cdfae3b74c 100644 --- a/.github/workflows/samples-python-client-echo-api.yaml +++ b/.github/workflows/samples-python-client-echo-api.yaml @@ -7,6 +7,18 @@ on: - samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/** - .github/workflows/samples-python-client-echo-api.yaml jobs: + validate-pyproject-toml: + name: Validate pyproject.toml + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: "3.13" + - name: Install validator + run: pip install 'validate-pyproject[all]' + - name: Validate + run: validate-pyproject samples/client/echo_api/python/pyproject.toml build: name: Test Python client runs-on: ubuntu-latest From cd65e5c37c8695dd985b7f237aba4016157b6195 Mon Sep 17 00:00:00 2001 From: Youri Westerman Date: Tue, 10 Jun 2025 12:20:42 +0200 Subject: [PATCH 2/7] Use PEP-508 compatible version constraint for `requires-python` key --- .../src/main/resources/python/pyproject.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/resources/python/pyproject.mustache b/modules/openapi-generator/src/main/resources/python/pyproject.mustache index 4b2949c9e9db..4f55d3cad2a0 100644 --- a/modules/openapi-generator/src/main/resources/python/pyproject.mustache +++ b/modules/openapi-generator/src/main/resources/python/pyproject.mustache @@ -43,7 +43,7 @@ pydantic = ">= 2" typing-extensions = ">= 4.7.1" {{/poetry1}} {{^poetry1}} -requires-python = "^3.9" +requires-python = ">3.8" dependencies = [ "urllib3 (>=2.1.0,<3.0.0)", From e1f87b1441bb4c249195fb2d9fdcdd4c4c892033 Mon Sep 17 00:00:00 2001 From: Youri Westerman Date: Tue, 10 Jun 2025 12:24:17 +0200 Subject: [PATCH 3/7] Update samples --- .../pyproject.toml | 2 +- samples/client/echo_api/python/pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/pyproject.toml b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/pyproject.toml index 602a4bba01a1..5476886cb40b 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/pyproject.toml +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/pyproject.toml @@ -8,7 +8,7 @@ authors = [ license = "Apache 2.0" readme = "README.md" keywords = ["OpenAPI", "OpenAPI-Generator", "Echo Server API"] -requires-python = "^3.9" +requires-python = ">3.8" dependencies = [ "urllib3 (>=2.1.0,<3.0.0)", diff --git a/samples/client/echo_api/python/pyproject.toml b/samples/client/echo_api/python/pyproject.toml index 602a4bba01a1..5476886cb40b 100644 --- a/samples/client/echo_api/python/pyproject.toml +++ b/samples/client/echo_api/python/pyproject.toml @@ -8,7 +8,7 @@ authors = [ license = "Apache 2.0" readme = "README.md" keywords = ["OpenAPI", "OpenAPI-Generator", "Echo Server API"] -requires-python = "^3.9" +requires-python = ">3.8" dependencies = [ "urllib3 (>=2.1.0,<3.0.0)", From d39017047206888b16dbb26d145d08e30994c37c Mon Sep 17 00:00:00 2001 From: Youri Westerman Date: Wed, 11 Jun 2025 10:36:38 +0200 Subject: [PATCH 4/7] Move job to petstore workflow --- .../workflows/samples-python-client-echo-api.yaml | 12 ------------ .github/workflows/samples-python-petstore.yaml | 12 ++++++++++++ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/samples-python-client-echo-api.yaml b/.github/workflows/samples-python-client-echo-api.yaml index 95cdfae3b74c..b90c25db1b9c 100644 --- a/.github/workflows/samples-python-client-echo-api.yaml +++ b/.github/workflows/samples-python-client-echo-api.yaml @@ -7,18 +7,6 @@ on: - samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/** - .github/workflows/samples-python-client-echo-api.yaml jobs: - validate-pyproject-toml: - name: Validate pyproject.toml - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: "3.13" - - name: Install validator - run: pip install 'validate-pyproject[all]' - - name: Validate - run: validate-pyproject samples/client/echo_api/python/pyproject.toml build: name: Test Python client runs-on: ubuntu-latest diff --git a/.github/workflows/samples-python-petstore.yaml b/.github/workflows/samples-python-petstore.yaml index 2b4b1c91e3c4..bb659c8b8e65 100644 --- a/.github/workflows/samples-python-petstore.yaml +++ b/.github/workflows/samples-python-petstore.yaml @@ -8,6 +8,18 @@ on: - .github/workflows/samples-python-petstore.yaml jobs: + validate-pyproject-toml: + name: Validate pyproject.toml + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: "3.13" + - name: Install validator + run: pip install 'validate-pyproject[all]' + - name: Validate + run: validate-pyproject samples/openapi3/client/petstore/python/pyproject.toml build: name: Test Python client runs-on: ubuntu-latest From c3c8d9979a0725453a743557f3e736cfe77d53f0 Mon Sep 17 00:00:00 2001 From: Youri Westerman Date: Wed, 11 Jun 2025 10:43:24 +0200 Subject: [PATCH 5/7] Update generated sample --- samples/openapi3/client/petstore/python/pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/openapi3/client/petstore/python/pyproject.toml b/samples/openapi3/client/petstore/python/pyproject.toml index fbf945b895c1..f9042cb84ca9 100644 --- a/samples/openapi3/client/petstore/python/pyproject.toml +++ b/samples/openapi3/client/petstore/python/pyproject.toml @@ -8,7 +8,7 @@ authors = [ license = "Apache-2.0" readme = "README.md" keywords = ["OpenAPI", "OpenAPI-Generator", "OpenAPI Petstore"] -requires-python = "^3.9" +requires-python = ">3.8" dependencies = [ "urllib3 (>=2.1.0,<3.0.0)", From 557a112585681df46d7daa55993d33a5af43d04b Mon Sep 17 00:00:00 2001 From: Youri Westerman Date: Thu, 12 Jun 2025 18:15:13 +0200 Subject: [PATCH 6/7] Use equals or greater than operator instead of greater than --- .../src/main/resources/python/pyproject.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/resources/python/pyproject.mustache b/modules/openapi-generator/src/main/resources/python/pyproject.mustache index 4f55d3cad2a0..b97a1a5a77cc 100644 --- a/modules/openapi-generator/src/main/resources/python/pyproject.mustache +++ b/modules/openapi-generator/src/main/resources/python/pyproject.mustache @@ -43,7 +43,7 @@ pydantic = ">= 2" typing-extensions = ">= 4.7.1" {{/poetry1}} {{^poetry1}} -requires-python = ">3.8" +requires-python = ">=3.9" dependencies = [ "urllib3 (>=2.1.0,<3.0.0)", From a7cb58693e57d600a58db073bc406a11886dc71c Mon Sep 17 00:00:00 2001 From: Youri Westerman Date: Thu, 12 Jun 2025 18:17:12 +0200 Subject: [PATCH 7/7] Update samples --- .../pyproject.toml | 2 +- samples/client/echo_api/python/pyproject.toml | 2 +- samples/openapi3/client/petstore/python/pyproject.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/pyproject.toml b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/pyproject.toml index 5476886cb40b..db1f365aa469 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/pyproject.toml +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/pyproject.toml @@ -8,7 +8,7 @@ authors = [ license = "Apache 2.0" readme = "README.md" keywords = ["OpenAPI", "OpenAPI-Generator", "Echo Server API"] -requires-python = ">3.8" +requires-python = ">=3.9" dependencies = [ "urllib3 (>=2.1.0,<3.0.0)", diff --git a/samples/client/echo_api/python/pyproject.toml b/samples/client/echo_api/python/pyproject.toml index 5476886cb40b..db1f365aa469 100644 --- a/samples/client/echo_api/python/pyproject.toml +++ b/samples/client/echo_api/python/pyproject.toml @@ -8,7 +8,7 @@ authors = [ license = "Apache 2.0" readme = "README.md" keywords = ["OpenAPI", "OpenAPI-Generator", "Echo Server API"] -requires-python = ">3.8" +requires-python = ">=3.9" dependencies = [ "urllib3 (>=2.1.0,<3.0.0)", diff --git a/samples/openapi3/client/petstore/python/pyproject.toml b/samples/openapi3/client/petstore/python/pyproject.toml index f9042cb84ca9..b790b56f03d3 100644 --- a/samples/openapi3/client/petstore/python/pyproject.toml +++ b/samples/openapi3/client/petstore/python/pyproject.toml @@ -8,7 +8,7 @@ authors = [ license = "Apache-2.0" readme = "README.md" keywords = ["OpenAPI", "OpenAPI-Generator", "OpenAPI Petstore"] -requires-python = ">3.8" +requires-python = ">=3.9" dependencies = [ "urllib3 (>=2.1.0,<3.0.0)",