Skip to content

Commit b66ec8e

Browse files
authored
⬆️ Drop support for Python 3.7, require Python 3.8 or above (fastapi#1316)
1 parent de78b8c commit b66ec8e

File tree

11 files changed

+15
-33
lines changed

11 files changed

+15
-33
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,6 @@ jobs:
3636
pydantic-version:
3737
- pydantic-v1
3838
- pydantic-v2
39-
include:
40-
- os: ubuntu-22.04
41-
python-version: "3.7"
42-
pydantic-version: pydantic-v1
43-
- os: ubuntu-22.04
44-
python-version: "3.7"
45-
pydantic-version: pydantic-v2
4639
fail-fast: false
4740
runs-on: ${{ matrix.os }}
4841
steps:
@@ -73,12 +66,8 @@ jobs:
7366
- name: Install Pydantic v2
7467
if: matrix.pydantic-version == 'pydantic-v2'
7568
run: uv pip install --upgrade "pydantic>=2.0.2,<3.0.0"
76-
- name: Pin typing-extensions for Python 3.7
77-
if: matrix.python-version == '3.7'
78-
run: uv pip install --upgrade "typing-extensions==4.6.1"
7969
- name: Lint
80-
# Do not run on Python 3.7 as mypy behaves differently
81-
if: matrix.python-version != '3.7' && matrix.pydantic-version == 'pydantic-v2'
70+
if: matrix.pydantic-version == 'pydantic-v2'
8271
run: bash scripts/lint.sh
8372
- run: mkdir coverage
8473
- name: Test

docs/tutorial/automatic-id-none-refresh.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ And as we created the **engine** with `echo=True`, we can see the SQL statements
342342

343343
////
344344

345-
//// tab | Python 3.7+
345+
//// tab | Python 3.8+
346346

347347
```Python
348348
{!./docs_src/tutorial/automatic_id_none_refresh/tutorial002.py!}

docs/tutorial/create-db-and-table.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ Now, let's give the code a final look:
562562

563563
////
564564

565-
//// tab | Python 3.7+
565+
//// tab | Python 3.8+
566566

567567
```{.python .annotate}
568568
{!./docs_src/tutorial/create_db_and_table/tutorial003.py!}

docs/tutorial/delete.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ Now let's review all that code:
227227

228228
////
229229

230-
//// tab | Python 3.7+
230+
//// tab | Python 3.8+
231231

232232
```{ .python .annotate hl_lines="72-90" }
233233
{!./docs_src/tutorial/delete/tutorial002.py!}

docs/tutorial/fastapi/tests.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ Now we can run the tests with `pytest` and see the results:
356356
$ pytest
357357

358358
============= test session starts ==============
359-
platform linux -- Python 3.7.5, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
359+
platform linux -- Python 3.10.0, pytest-7.4.4, pluggy-1.5.0
360360
rootdir: /home/user/code/sqlmodel-tutorial
361361
<b>collected 7 items </b>
362362

docs/tutorial/insert.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ This is the code we had to create the database and table, nothing new here:
3939

4040
////
4141

42-
//// tab | Python 3.7+
42+
//// tab | Python 3.8+
4343

4444
```{.python .annotate hl_lines="22" }
4545
{!./docs_src/tutorial/create_db_and_table/tutorial003.py[ln:1-20]!}
@@ -343,7 +343,7 @@ Let's focus on the new code:
343343

344344
////
345345

346-
//// tab | Python 3.7+
346+
//// tab | Python 3.8+
347347

348348
```{.python .annotate }
349349
{!./docs_src/tutorial/insert/tutorial003.py!}

docs/tutorial/select.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ Let's review the code up to this point:
273273

274274
////
275275

276-
//// tab | Python 3.7+
276+
//// tab | Python 3.8+
277277

278278
```{ .python .annotate }
279279
{!./docs_src/tutorial/select/tutorial002.py!}

docs/tutorial/update.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ Now let's review all that code:
236236

237237
////
238238

239-
//// tab | Python 3.7+
239+
//// tab | Python 3.8+
240240

241241
```{ .python .annotate hl_lines="44-55" }
242242
{!./docs_src/tutorial/update/tutorial002.py!}
@@ -272,7 +272,7 @@ This also means that you can update several fields (attributes, columns) at once
272272

273273
////
274274

275-
//// tab | Python 3.7+
275+
//// tab | Python 3.8+
276276

277277
```{ .python .annotate hl_lines="15-17 19-21 23" }
278278
# Code above omitted 👆
@@ -296,7 +296,7 @@ This also means that you can update several fields (attributes, columns) at once
296296

297297
////
298298

299-
//// tab | Python 3.7+
299+
//// tab | Python 3.8+
300300

301301
```Python
302302
{!./docs_src/tutorial/update/tutorial004.py!}

pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ name = "sqlmodel"
77
dynamic = ["version"]
88
description = "SQLModel, SQL databases in Python, designed for simplicity, compatibility, and robustness."
99
readme = "README.md"
10-
requires-python = ">=3.7"
10+
requires-python = ">=3.8"
1111
authors = [
1212
{ name = "Sebastián Ramírez", email = "[email protected]" },
1313
]
@@ -20,7 +20,6 @@ classifiers = [
2020
"Intended Audience :: System Administrators",
2121
"License :: OSI Approved :: MIT License",
2222
"Programming Language :: Python :: 3 :: Only",
23-
"Programming Language :: Python :: 3.7",
2423
"Programming Language :: Python :: 3.8",
2524
"Programming Language :: Python :: 3.9",
2625
"Programming Language :: Python :: 3.10",

requirements-docs.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ pillow==11.0.0
1111
# For image processing by Material for MkDocs
1212
cairosvg==2.7.1
1313
# mkdocstrings[python]==0.25.1
14-
# Enable griffe-typingdoc once dropping Python 3.7 and upgrading typing-extensions
15-
# griffe-typingdoc==0.2.5
14+
griffe-typingdoc==0.2.5
1615
# For griffe, it formats with black
1716
typer == 0.12.3
1817
mkdocs-macros-plugin==1.0.5

0 commit comments

Comments
 (0)