]> git.ipfire.org Git - thirdparty/fastapi/sqlmodel.git/commitdiff
⬆️ Drop support for Python 3.7, require Python 3.8 or above (#1316)
authorSofie Van Landeghem <svlandeg@users.noreply.github.com>
Sun, 16 Mar 2025 20:32:07 +0000 (21:32 +0100)
committerGitHub <noreply@github.com>
Sun, 16 Mar 2025 20:32:07 +0000 (21:32 +0100)
.github/workflows/test.yml
docs/tutorial/automatic-id-none-refresh.md
docs/tutorial/create-db-and-table.md
docs/tutorial/delete.md
docs/tutorial/fastapi/tests.md
docs/tutorial/insert.md
docs/tutorial/select.md
docs/tutorial/update.md
pyproject.toml
requirements-docs.txt
requirements-tests.txt

index f842d517981a48de115599a601b81bbc00d9587d..57dba1c286bc2fd4bd98924654a8e6fe0a8f54b3 100644 (file)
@@ -36,13 +36,6 @@ jobs:
         pydantic-version:
           - pydantic-v1
           - pydantic-v2
-        include:
-          - os: ubuntu-22.04
-            python-version: "3.7"
-            pydantic-version: pydantic-v1
-          - os: ubuntu-22.04
-            python-version: "3.7"
-            pydantic-version: pydantic-v2
       fail-fast: false
     runs-on: ${{ matrix.os }}
     steps:
@@ -73,12 +66,8 @@ jobs:
       - name: Install Pydantic v2
         if: matrix.pydantic-version == 'pydantic-v2'
         run: uv pip install --upgrade "pydantic>=2.0.2,<3.0.0"
-      - name: Pin typing-extensions for Python 3.7
-        if: matrix.python-version == '3.7'
-        run: uv pip install --upgrade "typing-extensions==4.6.1"
       - name: Lint
-        # Do not run on Python 3.7 as mypy behaves differently
-        if: matrix.python-version != '3.7' && matrix.pydantic-version == 'pydantic-v2'
+        if: matrix.pydantic-version == 'pydantic-v2'
         run: bash scripts/lint.sh
       - run: mkdir coverage
       - name: Test
index 464227f60b68e9f04dcbe6fdd1e53f943ec1d588..7c7983c3d38817ecafbd553c6fec74aecf7a56ea 100644 (file)
@@ -342,7 +342,7 @@ And as we created the **engine** with `echo=True`, we can see the SQL statements
 
 ////
 
-//// tab | Python 3.7+
+//// tab | Python 3.8+
 
 ```Python
 {!./docs_src/tutorial/automatic_id_none_refresh/tutorial002.py!}
index c1076d5887667509051218af9aa49168e1596949..288e2bb20b8871f623d26dd3f1fb91a3702d0f4a 100644 (file)
@@ -562,7 +562,7 @@ Now, let's give the code a final look:
 
 ////
 
-//// tab | Python 3.7+
+//// tab | Python 3.8+
 
 ```{.python .annotate}
 {!./docs_src/tutorial/create_db_and_table/tutorial003.py!}
index fbf65eb3ea7ace2f6879f32acca3086b31ea4673..b0eaf6788b3cecadc82e794bdecc719aef38badd 100644 (file)
@@ -227,7 +227,7 @@ Now let's review all that code:
 
 ////
 
-//// tab | Python 3.7+
+//// tab | Python 3.8+
 
 ```{ .python .annotate hl_lines="72-90" }
 {!./docs_src/tutorial/delete/tutorial002.py!}
index 9c5255b7bf3567fc8a68fd0198cb261ac1988ede..ed4f91bcd610c239c21c3e444980fd28d4897bd8 100644 (file)
@@ -356,7 +356,7 @@ Now we can run the tests with `pytest` and see the results:
 $ pytest
 
 ============= test session starts ==============
-platform linux -- Python 3.7.5, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
+platform linux -- Python 3.10.0, pytest-7.4.4, pluggy-1.5.0
 rootdir: /home/user/code/sqlmodel-tutorial
 <b>collected 7 items                              </b>
 
index 2110e4c0b2b17cb62ed12eb9c0b43f72a69de318..01977de35b317b2ae89d0e9e92477b6923f81b56 100644 (file)
@@ -39,7 +39,7 @@ This is the code we had to create the database and table, nothing new here:
 
 ////
 
-//// tab | Python 3.7+
+//// tab | Python 3.8+
 
 ```{.python .annotate hl_lines="22" }
 {!./docs_src/tutorial/create_db_and_table/tutorial003.py[ln:1-20]!}
@@ -343,7 +343,7 @@ Let's focus on the new code:
 
 ////
 
-//// tab | Python 3.7+
+//// tab | Python 3.8+
 
 ```{.python .annotate }
 {!./docs_src/tutorial/insert/tutorial003.py!}
index d130b514fddbff21c8ad18d9b36967ac19f30f47..cd996932c628ee7347babf46a2bba87083043a5c 100644 (file)
@@ -273,7 +273,7 @@ Let's review the code up to this point:
 
 ////
 
-//// tab | Python 3.7+
+//// tab | Python 3.8+
 
 ```{ .python .annotate }
 {!./docs_src/tutorial/select/tutorial002.py!}
index 497a2c1a78190d9428b1faaab00af4ff7b17fca2..8e60536815cef928dc57f2180b48871d6f41d319 100644 (file)
@@ -236,7 +236,7 @@ Now let's review all that code:
 
 ////
 
-//// tab | Python 3.7+
+//// tab | Python 3.8+
 
 ```{ .python .annotate hl_lines="44-55" }
 {!./docs_src/tutorial/update/tutorial002.py!}
@@ -272,7 +272,7 @@ This also means that you can update several fields (attributes, columns) at once
 
 ////
 
-//// tab | Python 3.7+
+//// tab | Python 3.8+
 
 ```{ .python .annotate hl_lines="15-17  19-21  23" }
 # Code above omitted 👆
@@ -296,7 +296,7 @@ This also means that you can update several fields (attributes, columns) at once
 
 ////
 
-//// tab | Python 3.7+
+//// tab | Python 3.8+
 
 ```Python
 {!./docs_src/tutorial/update/tutorial004.py!}
index bc8e9e2f6e34a91d7375edcb54e831e3c482cf94..766b0558194f913e1faf49de75329601584b1cd3 100644 (file)
@@ -7,7 +7,7 @@ name = "sqlmodel"
 dynamic = ["version"]
 description = "SQLModel, SQL databases in Python, designed for simplicity, compatibility, and robustness."
 readme = "README.md"
-requires-python = ">=3.7"
+requires-python = ">=3.8"
 authors = [
     { name = "Sebastián Ramírez", email = "tiangolo@gmail.com" },
 ]
@@ -20,7 +20,6 @@ classifiers = [
     "Intended Audience :: System Administrators",
     "License :: OSI Approved :: MIT License",
     "Programming Language :: Python :: 3 :: Only",
-    "Programming Language :: Python :: 3.7",
     "Programming Language :: Python :: 3.8",
     "Programming Language :: Python :: 3.9",
     "Programming Language :: Python :: 3.10",
index da15671f505f0d72b60b17515ea63e1886b4c30c..318103451bc2da6bb772b26467e233641111c313 100644 (file)
@@ -11,8 +11,7 @@ pillow==11.0.0
 # For image processing by Material for MkDocs
 cairosvg==2.7.1
 # mkdocstrings[python]==0.25.1
-# Enable griffe-typingdoc once dropping Python 3.7 and upgrading typing-extensions
-# griffe-typingdoc==0.2.5
+griffe-typingdoc==0.2.5
 # For griffe, it formats with black
 typer == 0.12.3
 mkdocs-macros-plugin==1.0.5
index b33f3bf1b7acb509dcb46e02e1ecceeed9454078..2ed86fac8d23535bd6f73e167203016e6468b73b 100644 (file)
@@ -7,11 +7,6 @@ ruff ==0.9.6
 # For FastAPI tests
 fastapi >=0.103.2
 httpx ==0.24.1
-# TODO: upgrade when deprecating Python 3.7
-dirty-equals ==0.6.0; python_version < "3.8"
-dirty-equals ==0.9.0; python_version >= "3.8"
+dirty-equals ==0.9.0
 jinja2 ==3.1.4
-# Pin typing-extensions until Python 3.8 is deprecated or the issue with dirty-equals
-# is fixed, maybe fixed after dropping Python 3.7 and upgrading dirty-equals
-typing-extensions ==4.6.1; python_version < "3.8"
-typing-extensions ==4.12.2; python_version >= "3.8"
+typing-extensions ==4.12.2