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:
- 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
////
-//// tab | Python 3.7+
+//// tab | Python 3.8+
```Python
{!./docs_src/tutorial/automatic_id_none_refresh/tutorial002.py!}
////
-//// tab | Python 3.7+
+//// tab | Python 3.8+
```{.python .annotate}
{!./docs_src/tutorial/create_db_and_table/tutorial003.py!}
////
-//// tab | Python 3.7+
+//// tab | Python 3.8+
```{ .python .annotate hl_lines="72-90" }
{!./docs_src/tutorial/delete/tutorial002.py!}
$ 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>
////
-//// 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]!}
////
-//// tab | Python 3.7+
+//// tab | Python 3.8+
```{.python .annotate }
{!./docs_src/tutorial/insert/tutorial003.py!}
////
-//// tab | Python 3.7+
+//// tab | Python 3.8+
```{ .python .annotate }
{!./docs_src/tutorial/select/tutorial002.py!}
////
-//// tab | Python 3.7+
+//// tab | Python 3.8+
```{ .python .annotate hl_lines="44-55" }
{!./docs_src/tutorial/update/tutorial002.py!}
////
-//// tab | Python 3.7+
+//// tab | Python 3.8+
```{ .python .annotate hl_lines="15-17 19-21 23" }
# Code above omitted 👆
////
-//// tab | Python 3.7+
+//// tab | Python 3.8+
```Python
{!./docs_src/tutorial/update/tutorial004.py!}
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" },
]
"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",
# 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
# 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