Skip to content

Commit fe56711

Browse files
author
Joakim Nordling
authored
Update datamodel-code-generator and other deps (#47)
* Update datamodel-code-generator and other deps Update datamodel-code-generator and other dependencies and pre-commit hooks. Removed support for Python 3.8 which is EOL and added tests to be run on Python 3.13. * Update mypy, configure mypy for python 3.9+
1 parent 3700de5 commit fe56711

8 files changed

Lines changed: 265 additions & 270 deletions

File tree

.github/workflows/tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
strategy:
1212
matrix:
13-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
13+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
1414
steps:
1515
- name: Checkout 🔁
1616
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# See https://pre-commit.com/hooks.html for more hooks
33
repos:
44
- repo: https://github.com/pre-commit/pre-commit-hooks
5-
rev: v4.6.0
5+
rev: v5.0.0
66
hooks:
77
- id: trailing-whitespace
88
- id: end-of-file-fixer
@@ -36,7 +36,7 @@ repos:
3636
- id: prettier
3737
exclude: "^openapi_to_fastapi/tests/__snapshots__/"
3838
- repo: https://github.com/pycqa/flake8
39-
rev: 7.1.1
39+
rev: 7.2.0
4040
hooks:
4141
- id: flake8
4242
- repo: https://github.com/twu/skjold

.skjoldignore

Lines changed: 0 additions & 6 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ router = SpecRouter(specs, validators=[MyValidator])
255255

256256
You will need:
257257

258-
- Python 3.8.1+ (tested on 3.8 - 3.12)
258+
- Python 3.9+ (tested on 3.9 - 3.13)
259259
- [pre-commit](https://pre-commit.com/#install)
260260

261261
Before working on the project, make sure you run:

openapi_to_fastapi/model_generator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def generate_model_from_schema(schema: str, format_code: bool = False) -> str:
2929
base_class="pydantic.BaseModel",
3030
custom_template_dir=None,
3131
extra_template_data=None,
32-
target_python_version=PythonVersion.PY_38,
32+
target_python_version=PythonVersion.PY_39,
3333
dump_resolve_reference_action=None,
3434
field_constraints=False,
3535
snake_case_field=False,

poetry.lock

Lines changed: 249 additions & 248 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "openapi-to-fastapi"
3-
version = "0.17.0"
3+
version = "0.18.0"
44
description = "Create FastAPI routes from OpenAPI spec"
55
authors = ["IOXIO Ltd"]
66
license = "BSD-3-Clause"
@@ -14,19 +14,19 @@ packages = [
1414
openapi-validator = "openapi_to_fastapi.cli:cli_validate_specs"
1515

1616
[tool.poetry.dependencies]
17-
python = ">=3.8.1,<4.0.0"
18-
datamodel-code-generator = "^0.26.1"
19-
fastapi = "^0.115.2"
20-
click = "^8.1.7"
17+
python = "^3.9"
18+
datamodel-code-generator = "^0.28.5"
19+
fastapi = "^0.115.12"
20+
click = "^8.1.8"
2121
coloredlogs = "^15.0.1"
22-
pydantic = "^2.9.2"
22+
pydantic = "^2.11.1"
2323

2424
[tool.poetry.group.dev.dependencies]
2525
isort = "^5.13.2"
26-
pytest = "^8.3.3"
27-
pytest-asyncio = "^0.24.0"
28-
flake8 = "^7.1.1"
29-
mypy = "^1.12.0"
26+
pytest = "^8.3.5"
27+
pytest-asyncio = "^0.26.0"
28+
flake8 = "^7.2.0"
29+
mypy = "^1.15.0"
3030
invoke = "^2.2.0"
3131
httpx = "^0.27.2"
3232
syrupy = "^4.7.2"

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ exclude = .venv,.git,.mypy_cache
2020
[mypy]
2121
warn_return_any = True
2222
ignore_missing_imports = True
23-
python_version = 3.8
23+
python_version = 3.9

0 commit comments

Comments
 (0)