Skip to content

Commit 3ed0139

Browse files
authored
[python-fastapi] Set python version to 3.10 (#22823)
* set python version to 3.10 * update doc
1 parent 73a486a commit 3ed0139

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

docs/generators/python-fastapi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ title: Documentation for the python-fastapi Generator
1010
| generator stability | BETA | |
1111
| generator type | SERVER | |
1212
| generator language | Python | |
13-
| generator language version | 3.7 | |
13+
| generator language version | 3.10 | |
1414
| generator default templating engine | mustache | |
1515
| helpTxt | Generates a Python FastAPI server (beta). Models are defined with the pydantic library | |
1616

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ public void postProcess() {
330330

331331
@Override
332332
public String generatorLanguageVersion() {
333-
return "3.7";
333+
return "3.10";
334334
}
335335

336336
@Override

samples/server/petstore/python-fastapi/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.7 AS builder
1+
FROM python:3.10 AS builder
22

33
WORKDIR /usr/src/app
44

@@ -11,7 +11,7 @@ COPY . .
1111
RUN pip install --no-cache-dir .
1212

1313

14-
FROM python:3.7 AS test_runner
14+
FROM python:3.10 AS test_runner
1515
WORKDIR /tmp
1616
COPY --from=builder /venv /venv
1717
COPY --from=builder /usr/src/app/tests tests
@@ -24,7 +24,7 @@ RUN pip install pytest
2424
RUN pytest tests
2525

2626

27-
FROM python:3.7 AS service
27+
FROM python:3.10 AS service
2828
WORKDIR /root/app/site-packages
2929
COPY --from=test_runner /venv /venv
3030
ENV PATH=/venv/bin:$PATH

samples/server/petstore/python-fastapi/README.md

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

99
## Requirements.
1010

11-
Python >= 3.7
11+
Python >= 3.10
1212

1313
## Installation & Usage
1414

samples/server/petstore/python-fastapi/setup.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ version = 1.0.0
44
description = This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
55
long_description = file: README.md
66
keywords = OpenAPI OpenAPI Petstore
7-
python_requires = >= 3.7.*
7+
python_requires = >= 3.10.*
88
classifiers =
99
Operating System :: OS Independent
1010
Programming Language :: Python :: 3
11-
Programming Language :: Python :: 3.7
11+
Programming Language :: Python :: 3.10
1212

1313
[options]
1414
install_requires = fastapi[all]

0 commit comments

Comments
 (0)