forked from loafle/openapi-generator-original
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
This commit is contained in:
parent
c749919812
commit
73b6b7084f
@ -18,11 +18,11 @@ jobs:
|
|||||||
- samples/client/echo_api/python
|
- samples/client/echo_api/python
|
||||||
- samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent
|
- samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent
|
||||||
python-version:
|
python-version:
|
||||||
- "3.8"
|
|
||||||
- "3.9"
|
- "3.9"
|
||||||
- "3.10"
|
- "3.10"
|
||||||
- "3.11"
|
- "3.11"
|
||||||
- "3.12"
|
- "3.12"
|
||||||
|
- "3.13"
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-python@v5
|
- uses: actions/setup-python@v5
|
||||||
|
@ -15,11 +15,11 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
python-version:
|
python-version:
|
||||||
- "3.8"
|
|
||||||
- "3.9"
|
- "3.9"
|
||||||
- "3.10"
|
- "3.10"
|
||||||
- "3.11"
|
- "3.11"
|
||||||
- "3.12"
|
- "3.12"
|
||||||
|
- "3.13"
|
||||||
sample:
|
sample:
|
||||||
- samples/openapi3/client/petstore/python-aiohttp
|
- samples/openapi3/client/petstore/python-aiohttp
|
||||||
- samples/openapi3/client/petstore/python
|
- samples/openapi3/client/petstore/python
|
||||||
|
@ -10,7 +10,7 @@ title: Documentation for the python Generator
|
|||||||
| generator stability | STABLE | |
|
| generator stability | STABLE | |
|
||||||
| generator type | CLIENT | |
|
| generator type | CLIENT | |
|
||||||
| generator language | Python | |
|
| generator language | Python | |
|
||||||
| generator language version | 3.8+ | |
|
| generator language version | 3.9+ | |
|
||||||
| generator default templating engine | mustache | |
|
| generator default templating engine | mustache | |
|
||||||
| helpTxt | Generates a Python client library. | |
|
| helpTxt | Generates a Python client library. | |
|
||||||
|
|
||||||
|
@ -428,7 +428,7 @@ public class PythonClientCodegen extends AbstractPythonCodegen implements Codege
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String generatorLanguageVersion() {
|
public String generatorLanguageVersion() {
|
||||||
return "3.8+";
|
return "3.9+";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -14,7 +14,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
|
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
@ -14,9 +14,6 @@ stages:
|
|||||||
- pip install -r test-requirements.txt
|
- pip install -r test-requirements.txt
|
||||||
- pytest --cov={{{packageName}}}
|
- pytest --cov={{{packageName}}}
|
||||||
|
|
||||||
pytest-3.8:
|
|
||||||
extends: .pytest
|
|
||||||
image: python:3.8-alpine
|
|
||||||
pytest-3.9:
|
pytest-3.9:
|
||||||
extends: .pytest
|
extends: .pytest
|
||||||
image: python:3.9-alpine
|
image: python:3.9-alpine
|
||||||
@ -29,3 +26,6 @@ pytest-3.11:
|
|||||||
pytest-3.12:
|
pytest-3.12:
|
||||||
extends: .pytest
|
extends: .pytest
|
||||||
image: python:3.12-alpine
|
image: python:3.12-alpine
|
||||||
|
pytest-3.13:
|
||||||
|
extends: .pytest
|
||||||
|
image: python:3.13-alpine
|
||||||
|
@ -10,7 +10,7 @@ keywords = ["OpenAPI", "OpenAPI-Generator", "{{{appName}}}"]
|
|||||||
include = ["{{packageName}}/py.typed"]
|
include = ["{{packageName}}/py.typed"]
|
||||||
|
|
||||||
[tool.poetry.dependencies]
|
[tool.poetry.dependencies]
|
||||||
python = "^3.8"
|
python = "^3.9"
|
||||||
|
|
||||||
urllib3 = ">= 2.1.0, < 3.0.0"
|
urllib3 = ">= 2.1.0, < 3.0.0"
|
||||||
python-dateutil = ">= 2.8.2"
|
python-dateutil = ">= 2.8.2"
|
||||||
|
@ -12,7 +12,7 @@ from setuptools import setup, find_packages # noqa: H301
|
|||||||
# http://pypi.python.org/pypi/setuptools
|
# http://pypi.python.org/pypi/setuptools
|
||||||
NAME = "{{{projectName}}}"
|
NAME = "{{{projectName}}}"
|
||||||
VERSION = "{{packageVersion}}"
|
VERSION = "{{packageVersion}}"
|
||||||
PYTHON_REQUIRES = ">= 3.8"
|
PYTHON_REQUIRES = ">= 3.9"
|
||||||
REQUIRES = [
|
REQUIRES = [
|
||||||
"urllib3 >= 2.1.0, < 3.0.0",
|
"urllib3 >= 2.1.0, < 3.0.0",
|
||||||
"python-dateutil >= 2.8.2",
|
"python-dateutil >= 2.8.2",
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
# ref: https://docs.travis-ci.com/user/languages/python
|
# ref: https://docs.travis-ci.com/user/languages/python
|
||||||
language: python
|
language: python
|
||||||
python:
|
python:
|
||||||
- "3.8"
|
|
||||||
- "3.9"
|
- "3.9"
|
||||||
- "3.10"
|
- "3.10"
|
||||||
- "3.11"
|
- "3.11"
|
||||||
- "3.12"
|
- "3.12"
|
||||||
|
- "3.13"
|
||||||
# uncomment the following if needed
|
# uncomment the following if needed
|
||||||
#- "3.12-dev" # 3.12 development branch
|
#- "3.13-dev" # 3.13 development branch
|
||||||
#- "nightly" # nightly build
|
#- "nightly" # nightly build
|
||||||
# command to install dependencies
|
# command to install dependencies
|
||||||
install:
|
install:
|
||||||
|
@ -13,7 +13,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
|
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
@ -14,9 +14,6 @@ stages:
|
|||||||
- pip install -r test-requirements.txt
|
- pip install -r test-requirements.txt
|
||||||
- pytest --cov=openapi_client
|
- pytest --cov=openapi_client
|
||||||
|
|
||||||
pytest-3.8:
|
|
||||||
extends: .pytest
|
|
||||||
image: python:3.8-alpine
|
|
||||||
pytest-3.9:
|
pytest-3.9:
|
||||||
extends: .pytest
|
extends: .pytest
|
||||||
image: python:3.9-alpine
|
image: python:3.9-alpine
|
||||||
@ -29,3 +26,6 @@ pytest-3.11:
|
|||||||
pytest-3.12:
|
pytest-3.12:
|
||||||
extends: .pytest
|
extends: .pytest
|
||||||
image: python:3.12-alpine
|
image: python:3.12-alpine
|
||||||
|
pytest-3.13:
|
||||||
|
extends: .pytest
|
||||||
|
image: python:3.13-alpine
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
# ref: https://docs.travis-ci.com/user/languages/python
|
# ref: https://docs.travis-ci.com/user/languages/python
|
||||||
language: python
|
language: python
|
||||||
python:
|
python:
|
||||||
- "3.8"
|
|
||||||
- "3.9"
|
- "3.9"
|
||||||
- "3.10"
|
- "3.10"
|
||||||
- "3.11"
|
- "3.11"
|
||||||
- "3.12"
|
- "3.12"
|
||||||
|
- "3.13"
|
||||||
# uncomment the following if needed
|
# uncomment the following if needed
|
||||||
#- "3.12-dev" # 3.12 development branch
|
#- "3.13-dev" # 3.13 development branch
|
||||||
#- "nightly" # nightly build
|
#- "nightly" # nightly build
|
||||||
# command to install dependencies
|
# command to install dependencies
|
||||||
install:
|
install:
|
||||||
|
@ -10,7 +10,7 @@ This Python package is automatically generated by the [OpenAPI Generator](https:
|
|||||||
|
|
||||||
## Requirements.
|
## Requirements.
|
||||||
|
|
||||||
Python 3.8+
|
Python 3.9+
|
||||||
|
|
||||||
## Installation & Usage
|
## Installation & Usage
|
||||||
### pip install
|
### pip install
|
||||||
|
@ -10,7 +10,7 @@ keywords = ["OpenAPI", "OpenAPI-Generator", "Echo Server API"]
|
|||||||
include = ["openapi_client/py.typed"]
|
include = ["openapi_client/py.typed"]
|
||||||
|
|
||||||
[tool.poetry.dependencies]
|
[tool.poetry.dependencies]
|
||||||
python = "^3.8"
|
python = "^3.9"
|
||||||
|
|
||||||
urllib3 = ">= 2.1.0, < 3.0.0"
|
urllib3 = ">= 2.1.0, < 3.0.0"
|
||||||
python-dateutil = ">= 2.8.2"
|
python-dateutil = ">= 2.8.2"
|
||||||
|
@ -23,7 +23,7 @@ from setuptools import setup, find_packages # noqa: H301
|
|||||||
# http://pypi.python.org/pypi/setuptools
|
# http://pypi.python.org/pypi/setuptools
|
||||||
NAME = "openapi-client"
|
NAME = "openapi-client"
|
||||||
VERSION = "1.0.0"
|
VERSION = "1.0.0"
|
||||||
PYTHON_REQUIRES = ">= 3.8"
|
PYTHON_REQUIRES = ">= 3.9"
|
||||||
REQUIRES = [
|
REQUIRES = [
|
||||||
"urllib3 >= 2.1.0, < 3.0.0",
|
"urllib3 >= 2.1.0, < 3.0.0",
|
||||||
"python-dateutil >= 2.8.2",
|
"python-dateutil >= 2.8.2",
|
||||||
|
@ -13,7 +13,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
|
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
@ -14,9 +14,6 @@ stages:
|
|||||||
- pip install -r test-requirements.txt
|
- pip install -r test-requirements.txt
|
||||||
- pytest --cov=openapi_client
|
- pytest --cov=openapi_client
|
||||||
|
|
||||||
pytest-3.8:
|
|
||||||
extends: .pytest
|
|
||||||
image: python:3.8-alpine
|
|
||||||
pytest-3.9:
|
pytest-3.9:
|
||||||
extends: .pytest
|
extends: .pytest
|
||||||
image: python:3.9-alpine
|
image: python:3.9-alpine
|
||||||
@ -29,3 +26,6 @@ pytest-3.11:
|
|||||||
pytest-3.12:
|
pytest-3.12:
|
||||||
extends: .pytest
|
extends: .pytest
|
||||||
image: python:3.12-alpine
|
image: python:3.12-alpine
|
||||||
|
pytest-3.13:
|
||||||
|
extends: .pytest
|
||||||
|
image: python:3.13-alpine
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
# ref: https://docs.travis-ci.com/user/languages/python
|
# ref: https://docs.travis-ci.com/user/languages/python
|
||||||
language: python
|
language: python
|
||||||
python:
|
python:
|
||||||
- "3.8"
|
|
||||||
- "3.9"
|
- "3.9"
|
||||||
- "3.10"
|
- "3.10"
|
||||||
- "3.11"
|
- "3.11"
|
||||||
- "3.12"
|
- "3.12"
|
||||||
|
- "3.13"
|
||||||
# uncomment the following if needed
|
# uncomment the following if needed
|
||||||
#- "3.12-dev" # 3.12 development branch
|
#- "3.13-dev" # 3.13 development branch
|
||||||
#- "nightly" # nightly build
|
#- "nightly" # nightly build
|
||||||
# command to install dependencies
|
# command to install dependencies
|
||||||
install:
|
install:
|
||||||
|
@ -10,7 +10,7 @@ This Python package is automatically generated by the [OpenAPI Generator](https:
|
|||||||
|
|
||||||
## Requirements.
|
## Requirements.
|
||||||
|
|
||||||
Python 3.8+
|
Python 3.9+
|
||||||
|
|
||||||
## Installation & Usage
|
## Installation & Usage
|
||||||
### pip install
|
### pip install
|
||||||
|
@ -10,7 +10,7 @@ keywords = ["OpenAPI", "OpenAPI-Generator", "Echo Server API"]
|
|||||||
include = ["openapi_client/py.typed"]
|
include = ["openapi_client/py.typed"]
|
||||||
|
|
||||||
[tool.poetry.dependencies]
|
[tool.poetry.dependencies]
|
||||||
python = "^3.8"
|
python = "^3.9"
|
||||||
|
|
||||||
urllib3 = ">= 2.1.0, < 3.0.0"
|
urllib3 = ">= 2.1.0, < 3.0.0"
|
||||||
python-dateutil = ">= 2.8.2"
|
python-dateutil = ">= 2.8.2"
|
||||||
|
@ -23,7 +23,7 @@ from setuptools import setup, find_packages # noqa: H301
|
|||||||
# http://pypi.python.org/pypi/setuptools
|
# http://pypi.python.org/pypi/setuptools
|
||||||
NAME = "openapi-client"
|
NAME = "openapi-client"
|
||||||
VERSION = "1.0.0"
|
VERSION = "1.0.0"
|
||||||
PYTHON_REQUIRES = ">= 3.8"
|
PYTHON_REQUIRES = ">= 3.9"
|
||||||
REQUIRES = [
|
REQUIRES = [
|
||||||
"urllib3 >= 2.1.0, < 3.0.0",
|
"urllib3 >= 2.1.0, < 3.0.0",
|
||||||
"python-dateutil >= 2.8.2",
|
"python-dateutil >= 2.8.2",
|
||||||
|
@ -13,7 +13,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
|
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
@ -14,9 +14,6 @@ stages:
|
|||||||
- pip install -r test-requirements.txt
|
- pip install -r test-requirements.txt
|
||||||
- pytest --cov=petstore_api
|
- pytest --cov=petstore_api
|
||||||
|
|
||||||
pytest-3.8:
|
|
||||||
extends: .pytest
|
|
||||||
image: python:3.8-alpine
|
|
||||||
pytest-3.9:
|
pytest-3.9:
|
||||||
extends: .pytest
|
extends: .pytest
|
||||||
image: python:3.9-alpine
|
image: python:3.9-alpine
|
||||||
@ -29,3 +26,6 @@ pytest-3.11:
|
|||||||
pytest-3.12:
|
pytest-3.12:
|
||||||
extends: .pytest
|
extends: .pytest
|
||||||
image: python:3.12-alpine
|
image: python:3.12-alpine
|
||||||
|
pytest-3.13:
|
||||||
|
extends: .pytest
|
||||||
|
image: python:3.13-alpine
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
# ref: https://docs.travis-ci.com/user/languages/python
|
# ref: https://docs.travis-ci.com/user/languages/python
|
||||||
language: python
|
language: python
|
||||||
python:
|
python:
|
||||||
- "3.8"
|
|
||||||
- "3.9"
|
- "3.9"
|
||||||
- "3.10"
|
- "3.10"
|
||||||
- "3.11"
|
- "3.11"
|
||||||
- "3.12"
|
- "3.12"
|
||||||
|
- "3.13"
|
||||||
# uncomment the following if needed
|
# uncomment the following if needed
|
||||||
#- "3.12-dev" # 3.12 development branch
|
#- "3.13-dev" # 3.13 development branch
|
||||||
#- "nightly" # nightly build
|
#- "nightly" # nightly build
|
||||||
# command to install dependencies
|
# command to install dependencies
|
||||||
install:
|
install:
|
||||||
|
@ -10,7 +10,7 @@ This Python package is automatically generated by the [OpenAPI Generator](https:
|
|||||||
|
|
||||||
## Requirements.
|
## Requirements.
|
||||||
|
|
||||||
Python 3.8+
|
Python 3.9+
|
||||||
|
|
||||||
## Installation & Usage
|
## Installation & Usage
|
||||||
### pip install
|
### pip install
|
||||||
|
@ -10,7 +10,7 @@ keywords = ["OpenAPI", "OpenAPI-Generator", "OpenAPI Petstore"]
|
|||||||
include = ["petstore_api/py.typed"]
|
include = ["petstore_api/py.typed"]
|
||||||
|
|
||||||
[tool.poetry.dependencies]
|
[tool.poetry.dependencies]
|
||||||
python = "^3.8"
|
python = "^3.9"
|
||||||
|
|
||||||
urllib3 = ">= 2.1.0, < 3.0.0"
|
urllib3 = ">= 2.1.0, < 3.0.0"
|
||||||
python-dateutil = ">= 2.8.2"
|
python-dateutil = ">= 2.8.2"
|
||||||
|
@ -22,7 +22,7 @@ from setuptools import setup, find_packages # noqa: H301
|
|||||||
# http://pypi.python.org/pypi/setuptools
|
# http://pypi.python.org/pypi/setuptools
|
||||||
NAME = "petstore-api"
|
NAME = "petstore-api"
|
||||||
VERSION = "1.0.0"
|
VERSION = "1.0.0"
|
||||||
PYTHON_REQUIRES = ">= 3.8"
|
PYTHON_REQUIRES = ">= 3.9"
|
||||||
REQUIRES = [
|
REQUIRES = [
|
||||||
"urllib3 >= 2.1.0, < 3.0.0",
|
"urllib3 >= 2.1.0, < 3.0.0",
|
||||||
"python-dateutil >= 2.8.2",
|
"python-dateutil >= 2.8.2",
|
||||||
|
@ -13,7 +13,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
|
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
@ -14,9 +14,6 @@ stages:
|
|||||||
- pip install -r test-requirements.txt
|
- pip install -r test-requirements.txt
|
||||||
- pytest --cov=petstore_api
|
- pytest --cov=petstore_api
|
||||||
|
|
||||||
pytest-3.8:
|
|
||||||
extends: .pytest
|
|
||||||
image: python:3.8-alpine
|
|
||||||
pytest-3.9:
|
pytest-3.9:
|
||||||
extends: .pytest
|
extends: .pytest
|
||||||
image: python:3.9-alpine
|
image: python:3.9-alpine
|
||||||
@ -29,3 +26,6 @@ pytest-3.11:
|
|||||||
pytest-3.12:
|
pytest-3.12:
|
||||||
extends: .pytest
|
extends: .pytest
|
||||||
image: python:3.12-alpine
|
image: python:3.12-alpine
|
||||||
|
pytest-3.13:
|
||||||
|
extends: .pytest
|
||||||
|
image: python:3.13-alpine
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
# ref: https://docs.travis-ci.com/user/languages/python
|
# ref: https://docs.travis-ci.com/user/languages/python
|
||||||
language: python
|
language: python
|
||||||
python:
|
python:
|
||||||
- "3.8"
|
|
||||||
- "3.9"
|
- "3.9"
|
||||||
- "3.10"
|
- "3.10"
|
||||||
- "3.11"
|
- "3.11"
|
||||||
- "3.12"
|
- "3.12"
|
||||||
|
- "3.13"
|
||||||
# uncomment the following if needed
|
# uncomment the following if needed
|
||||||
#- "3.12-dev" # 3.12 development branch
|
#- "3.13-dev" # 3.13 development branch
|
||||||
#- "nightly" # nightly build
|
#- "nightly" # nightly build
|
||||||
# command to install dependencies
|
# command to install dependencies
|
||||||
install:
|
install:
|
||||||
|
@ -10,7 +10,7 @@ This Python package is automatically generated by the [OpenAPI Generator](https:
|
|||||||
|
|
||||||
## Requirements.
|
## Requirements.
|
||||||
|
|
||||||
Python 3.8+
|
Python 3.9+
|
||||||
|
|
||||||
## Installation & Usage
|
## Installation & Usage
|
||||||
### pip install
|
### pip install
|
||||||
|
@ -10,7 +10,7 @@ keywords = ["OpenAPI", "OpenAPI-Generator", "OpenAPI Petstore"]
|
|||||||
include = ["petstore_api/py.typed"]
|
include = ["petstore_api/py.typed"]
|
||||||
|
|
||||||
[tool.poetry.dependencies]
|
[tool.poetry.dependencies]
|
||||||
python = "^3.8"
|
python = "^3.9"
|
||||||
|
|
||||||
urllib3 = ">= 2.1.0, < 3.0.0"
|
urllib3 = ">= 2.1.0, < 3.0.0"
|
||||||
python-dateutil = ">= 2.8.2"
|
python-dateutil = ">= 2.8.2"
|
||||||
|
@ -22,7 +22,7 @@ from setuptools import setup, find_packages # noqa: H301
|
|||||||
# http://pypi.python.org/pypi/setuptools
|
# http://pypi.python.org/pypi/setuptools
|
||||||
NAME = "petstore-api"
|
NAME = "petstore-api"
|
||||||
VERSION = "1.0.0"
|
VERSION = "1.0.0"
|
||||||
PYTHON_REQUIRES = ">= 3.8"
|
PYTHON_REQUIRES = ">= 3.9"
|
||||||
REQUIRES = [
|
REQUIRES = [
|
||||||
"urllib3 >= 2.1.0, < 3.0.0",
|
"urllib3 >= 2.1.0, < 3.0.0",
|
||||||
"python-dateutil >= 2.8.2",
|
"python-dateutil >= 2.8.2",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user