Skip to content

Commit 73b6b70

Browse files
authored
Drop python 3.8 support python 3.13 in python generator (#20909)
* Drop support for python 3.8 and add support for 3.13 in python generator templates * Update docs * Test samples without python 3.8 and with 3.13 * Generate samples
1 parent c749919 commit 73b6b70

File tree

33 files changed

+48
-48
lines changed

33 files changed

+48
-48
lines changed

.github/workflows/samples-python-client-echo-api.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ jobs:
1818
- samples/client/echo_api/python
1919
- samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent
2020
python-version:
21-
- "3.8"
2221
- "3.9"
2322
- "3.10"
2423
- "3.11"
2524
- "3.12"
25+
- "3.13"
2626
steps:
2727
- uses: actions/checkout@v4
2828
- uses: actions/setup-python@v5

.github/workflows/samples-python-petstore.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ jobs:
1515
fail-fast: false
1616
matrix:
1717
python-version:
18-
- "3.8"
1918
- "3.9"
2019
- "3.10"
2120
- "3.11"
2221
- "3.12"
22+
- "3.13"
2323
sample:
2424
- samples/openapi3/client/petstore/python-aiohttp
2525
- samples/openapi3/client/petstore/python

docs/generators/python.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ title: Documentation for the python Generator
1010
| generator stability | STABLE | |
1111
| generator type | CLIENT | |
1212
| generator language | Python | |
13-
| generator language version | 3.8+ | |
13+
| generator language version | 3.9+ | |
1414
| generator default templating engine | mustache | |
1515
| helpTxt | Generates a Python client library. | |
1616

modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ public String generatePackageName(String packageName) {
428428

429429
@Override
430430
public String generatorLanguageVersion() {
431-
return "3.8+";
431+
return "3.9+";
432432
}
433433

434434
@Override

modules/openapi-generator/src/main/resources/python/github-workflow.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: ubuntu-latest
1515
strategy:
1616
matrix:
17-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
17+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
1818

1919
steps:
2020
- uses: actions/checkout@v4

modules/openapi-generator/src/main/resources/python/gitlab-ci.mustache

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ stages:
1414
- pip install -r test-requirements.txt
1515
- pytest --cov={{{packageName}}}
1616

17-
pytest-3.8:
18-
extends: .pytest
19-
image: python:3.8-alpine
2017
pytest-3.9:
2118
extends: .pytest
2219
image: python:3.9-alpine
@@ -29,3 +26,6 @@ pytest-3.11:
2926
pytest-3.12:
3027
extends: .pytest
3128
image: python:3.12-alpine
29+
pytest-3.13:
30+
extends: .pytest
31+
image: python:3.13-alpine

modules/openapi-generator/src/main/resources/python/pyproject.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ keywords = ["OpenAPI", "OpenAPI-Generator", "{{{appName}}}"]
1010
include = ["{{packageName}}/py.typed"]
1111

1212
[tool.poetry.dependencies]
13-
python = "^3.8"
13+
python = "^3.9"
1414

1515
urllib3 = ">= 2.1.0, < 3.0.0"
1616
python-dateutil = ">= 2.8.2"

modules/openapi-generator/src/main/resources/python/setup.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ from setuptools import setup, find_packages # noqa: H301
1212
# http://pypi.python.org/pypi/setuptools
1313
NAME = "{{{projectName}}}"
1414
VERSION = "{{packageVersion}}"
15-
PYTHON_REQUIRES = ">= 3.8"
15+
PYTHON_REQUIRES = ">= 3.9"
1616
REQUIRES = [
1717
"urllib3 >= 2.1.0, < 3.0.0",
1818
"python-dateutil >= 2.8.2",

modules/openapi-generator/src/main/resources/python/travis.mustache

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# ref: https://docs.travis-ci.com/user/languages/python
22
language: python
33
python:
4-
- "3.8"
54
- "3.9"
65
- "3.10"
76
- "3.11"
87
- "3.12"
8+
- "3.13"
99
# uncomment the following if needed
10-
#- "3.12-dev" # 3.12 development branch
10+
#- "3.13-dev" # 3.13 development branch
1111
#- "nightly" # nightly build
1212
# command to install dependencies
1313
install:

samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/.github/workflows/python.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ubuntu-latest
1414
strategy:
1515
matrix:
16-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
16+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
1717

1818
steps:
1919
- uses: actions/checkout@v4

samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/.gitlab-ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ stages:
1414
- pip install -r test-requirements.txt
1515
- pytest --cov=openapi_client
1616

17-
pytest-3.8:
18-
extends: .pytest
19-
image: python:3.8-alpine
2017
pytest-3.9:
2118
extends: .pytest
2219
image: python:3.9-alpine
@@ -29,3 +26,6 @@ pytest-3.11:
2926
pytest-3.12:
3027
extends: .pytest
3128
image: python:3.12-alpine
29+
pytest-3.13:
30+
extends: .pytest
31+
image: python:3.13-alpine

samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# ref: https://docs.travis-ci.com/user/languages/python
22
language: python
33
python:
4-
- "3.8"
54
- "3.9"
65
- "3.10"
76
- "3.11"
87
- "3.12"
8+
- "3.13"
99
# uncomment the following if needed
10-
#- "3.12-dev" # 3.12 development branch
10+
#- "3.13-dev" # 3.13 development branch
1111
#- "nightly" # nightly build
1212
# command to install dependencies
1313
install:

samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This Python package is automatically generated by the [OpenAPI Generator](https:
1010

1111
## Requirements.
1212

13-
Python 3.8+
13+
Python 3.9+
1414

1515
## Installation & Usage
1616
### pip install

samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ keywords = ["OpenAPI", "OpenAPI-Generator", "Echo Server API"]
1010
include = ["openapi_client/py.typed"]
1111

1212
[tool.poetry.dependencies]
13-
python = "^3.8"
13+
python = "^3.9"
1414

1515
urllib3 = ">= 2.1.0, < 3.0.0"
1616
python-dateutil = ">= 2.8.2"

samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
# http://pypi.python.org/pypi/setuptools
2424
NAME = "openapi-client"
2525
VERSION = "1.0.0"
26-
PYTHON_REQUIRES = ">= 3.8"
26+
PYTHON_REQUIRES = ">= 3.9"
2727
REQUIRES = [
2828
"urllib3 >= 2.1.0, < 3.0.0",
2929
"python-dateutil >= 2.8.2",

samples/client/echo_api/python/.github/workflows/python.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ubuntu-latest
1414
strategy:
1515
matrix:
16-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
16+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
1717

1818
steps:
1919
- uses: actions/checkout@v4

samples/client/echo_api/python/.gitlab-ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ stages:
1414
- pip install -r test-requirements.txt
1515
- pytest --cov=openapi_client
1616

17-
pytest-3.8:
18-
extends: .pytest
19-
image: python:3.8-alpine
2017
pytest-3.9:
2118
extends: .pytest
2219
image: python:3.9-alpine
@@ -29,3 +26,6 @@ pytest-3.11:
2926
pytest-3.12:
3027
extends: .pytest
3128
image: python:3.12-alpine
29+
pytest-3.13:
30+
extends: .pytest
31+
image: python:3.13-alpine

samples/client/echo_api/python/.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# ref: https://docs.travis-ci.com/user/languages/python
22
language: python
33
python:
4-
- "3.8"
54
- "3.9"
65
- "3.10"
76
- "3.11"
87
- "3.12"
8+
- "3.13"
99
# uncomment the following if needed
10-
#- "3.12-dev" # 3.12 development branch
10+
#- "3.13-dev" # 3.13 development branch
1111
#- "nightly" # nightly build
1212
# command to install dependencies
1313
install:

samples/client/echo_api/python/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This Python package is automatically generated by the [OpenAPI Generator](https:
1010

1111
## Requirements.
1212

13-
Python 3.8+
13+
Python 3.9+
1414

1515
## Installation & Usage
1616
### pip install

samples/client/echo_api/python/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ keywords = ["OpenAPI", "OpenAPI-Generator", "Echo Server API"]
1010
include = ["openapi_client/py.typed"]
1111

1212
[tool.poetry.dependencies]
13-
python = "^3.8"
13+
python = "^3.9"
1414

1515
urllib3 = ">= 2.1.0, < 3.0.0"
1616
python-dateutil = ">= 2.8.2"

samples/client/echo_api/python/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
# http://pypi.python.org/pypi/setuptools
2424
NAME = "openapi-client"
2525
VERSION = "1.0.0"
26-
PYTHON_REQUIRES = ">= 3.8"
26+
PYTHON_REQUIRES = ">= 3.9"
2727
REQUIRES = [
2828
"urllib3 >= 2.1.0, < 3.0.0",
2929
"python-dateutil >= 2.8.2",

samples/openapi3/client/petstore/python-aiohttp/.github/workflows/python.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ubuntu-latest
1414
strategy:
1515
matrix:
16-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
16+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
1717

1818
steps:
1919
- uses: actions/checkout@v4

samples/openapi3/client/petstore/python-aiohttp/.gitlab-ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ stages:
1414
- pip install -r test-requirements.txt
1515
- pytest --cov=petstore_api
1616

17-
pytest-3.8:
18-
extends: .pytest
19-
image: python:3.8-alpine
2017
pytest-3.9:
2118
extends: .pytest
2219
image: python:3.9-alpine
@@ -29,3 +26,6 @@ pytest-3.11:
2926
pytest-3.12:
3027
extends: .pytest
3128
image: python:3.12-alpine
29+
pytest-3.13:
30+
extends: .pytest
31+
image: python:3.13-alpine

samples/openapi3/client/petstore/python-aiohttp/.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# ref: https://docs.travis-ci.com/user/languages/python
22
language: python
33
python:
4-
- "3.8"
54
- "3.9"
65
- "3.10"
76
- "3.11"
87
- "3.12"
8+
- "3.13"
99
# uncomment the following if needed
10-
#- "3.12-dev" # 3.12 development branch
10+
#- "3.13-dev" # 3.13 development branch
1111
#- "nightly" # nightly build
1212
# command to install dependencies
1313
install:

samples/openapi3/client/petstore/python-aiohttp/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This Python package is automatically generated by the [OpenAPI Generator](https:
1010

1111
## Requirements.
1212

13-
Python 3.8+
13+
Python 3.9+
1414

1515
## Installation & Usage
1616
### pip install

samples/openapi3/client/petstore/python-aiohttp/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ keywords = ["OpenAPI", "OpenAPI-Generator", "OpenAPI Petstore"]
1010
include = ["petstore_api/py.typed"]
1111

1212
[tool.poetry.dependencies]
13-
python = "^3.8"
13+
python = "^3.9"
1414

1515
urllib3 = ">= 2.1.0, < 3.0.0"
1616
python-dateutil = ">= 2.8.2"

samples/openapi3/client/petstore/python-aiohttp/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
# http://pypi.python.org/pypi/setuptools
2323
NAME = "petstore-api"
2424
VERSION = "1.0.0"
25-
PYTHON_REQUIRES = ">= 3.8"
25+
PYTHON_REQUIRES = ">= 3.9"
2626
REQUIRES = [
2727
"urllib3 >= 2.1.0, < 3.0.0",
2828
"python-dateutil >= 2.8.2",

samples/openapi3/client/petstore/python/.github/workflows/python.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ubuntu-latest
1414
strategy:
1515
matrix:
16-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
16+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
1717

1818
steps:
1919
- uses: actions/checkout@v4

samples/openapi3/client/petstore/python/.gitlab-ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ stages:
1414
- pip install -r test-requirements.txt
1515
- pytest --cov=petstore_api
1616

17-
pytest-3.8:
18-
extends: .pytest
19-
image: python:3.8-alpine
2017
pytest-3.9:
2118
extends: .pytest
2219
image: python:3.9-alpine
@@ -29,3 +26,6 @@ pytest-3.11:
2926
pytest-3.12:
3027
extends: .pytest
3128
image: python:3.12-alpine
29+
pytest-3.13:
30+
extends: .pytest
31+
image: python:3.13-alpine

samples/openapi3/client/petstore/python/.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# ref: https://docs.travis-ci.com/user/languages/python
22
language: python
33
python:
4-
- "3.8"
54
- "3.9"
65
- "3.10"
76
- "3.11"
87
- "3.12"
8+
- "3.13"
99
# uncomment the following if needed
10-
#- "3.12-dev" # 3.12 development branch
10+
#- "3.13-dev" # 3.13 development branch
1111
#- "nightly" # nightly build
1212
# command to install dependencies
1313
install:

samples/openapi3/client/petstore/python/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This Python package is automatically generated by the [OpenAPI Generator](https:
1010

1111
## Requirements.
1212

13-
Python 3.8+
13+
Python 3.9+
1414

1515
## Installation & Usage
1616
### pip install

samples/openapi3/client/petstore/python/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ keywords = ["OpenAPI", "OpenAPI-Generator", "OpenAPI Petstore"]
1010
include = ["petstore_api/py.typed"]
1111

1212
[tool.poetry.dependencies]
13-
python = "^3.8"
13+
python = "^3.9"
1414

1515
urllib3 = ">= 2.1.0, < 3.0.0"
1616
python-dateutil = ">= 2.8.2"

samples/openapi3/client/petstore/python/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
# http://pypi.python.org/pypi/setuptools
2323
NAME = "petstore-api"
2424
VERSION = "1.0.0"
25-
PYTHON_REQUIRES = ">= 3.8"
25+
PYTHON_REQUIRES = ">= 3.9"
2626
REQUIRES = [
2727
"urllib3 >= 2.1.0, < 3.0.0",
2828
"python-dateutil >= 2.8.2",

0 commit comments

Comments
 (0)