Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/generators/python-fastapi.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ title: Documentation for the python-fastapi Generator
| generator stability | BETA | |
| generator type | SERVER | |
| generator language | Python | |
| generator language version | 3.7 | |
| generator language version | 3.10 | |
| generator default templating engine | mustache | |
| helpTxt | Generates a Python FastAPI server (beta). Models are defined with the pydantic library | |

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ public void postProcess() {

@Override
public String generatorLanguageVersion() {
return "3.7";
return "3.10";
}

@Override
Expand Down
6 changes: 3 additions & 3 deletions samples/server/petstore/python-fastapi/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.7 AS builder
FROM python:3.10 AS builder

WORKDIR /usr/src/app

Expand All @@ -11,7 +11,7 @@ COPY . .
RUN pip install --no-cache-dir .


FROM python:3.7 AS test_runner
FROM python:3.10 AS test_runner
WORKDIR /tmp
COPY --from=builder /venv /venv
COPY --from=builder /usr/src/app/tests tests
Expand All @@ -24,7 +24,7 @@ RUN pip install pytest
RUN pytest tests


FROM python:3.7 AS service
FROM python:3.10 AS service
WORKDIR /root/app/site-packages
COPY --from=test_runner /venv /venv
ENV PATH=/venv/bin:$PATH
2 changes: 1 addition & 1 deletion samples/server/petstore/python-fastapi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This Python package is automatically generated by the [OpenAPI Generator](https:

## Requirements.

Python >= 3.7
Python >= 3.10

## Installation & Usage

Expand Down
4 changes: 2 additions & 2 deletions samples/server/petstore/python-fastapi/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ version = 1.0.0
description = This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
long_description = file: README.md
keywords = OpenAPI OpenAPI Petstore
python_requires = >= 3.7.*
python_requires = >= 3.10.*
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot Jan 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: python_requires uses an invalid version specifier. Wildcards are not permitted with >=, so >= 3.10.* will be rejected by packaging tools. Use a plain lower-bound like >= 3.10.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At samples/server/petstore/python-fastapi/setup.cfg, line 7:

<comment>`python_requires` uses an invalid version specifier. Wildcards are not permitted with `>=`, so `>= 3.10.*` will be rejected by packaging tools. Use a plain lower-bound like `>= 3.10`.</comment>

<file context>
@@ -4,11 +4,11 @@ version = 1.0.0
 long_description = file: README.md
 keywords = OpenAPI OpenAPI Petstore
-python_requires = >= 3.7.*
+python_requires = >= 3.10.*
 classifiers =
     Operating System :: OS Independent
</file context>
Suggested change
python_requires = >= 3.10.*
python_requires = >= 3.10
Fix with Cubic

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will address that later with another pr instead as it seems to be working fine at the moment (ci tests passed)

classifiers =
Operating System :: OS Independent
Programming Language :: Python :: 3
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.10

[options]
install_requires = fastapi[all]
Expand Down
Loading