From: Yurii Motov Date: Wed, 24 Dec 2025 20:46:10 +0000 (+0100) Subject: Update `docs_src/tutorial/create_db_and_table` X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a0da1be8893df5ea04bede5651b7ab952c129ba1;p=thirdparty%2Ffastapi%2Fsqlmodel.git Update `docs_src/tutorial/create_db_and_table` --- diff --git a/docs/tutorial/create-db-and-table.md b/docs/tutorial/create-db-and-table.md index 688567ed..42ec6049 100644 --- a/docs/tutorial/create-db-and-table.md +++ b/docs/tutorial/create-db-and-table.md @@ -562,10 +562,10 @@ Now, let's give the code a final look: //// -//// tab | Python 3.8+ +//// tab | Python 3.9+ ```{.python .annotate} -{!./docs_src/tutorial/create_db_and_table/tutorial003.py!} +{!./docs_src/tutorial/create_db_and_table/tutorial003_py39.py!} ``` {!./docs_src/tutorial/create_db_and_table/annotations/en/tutorial003.md!} diff --git a/docs/tutorial/insert.md b/docs/tutorial/insert.md index c11633d6..3ee03fef 100644 --- a/docs/tutorial/insert.md +++ b/docs/tutorial/insert.md @@ -39,14 +39,14 @@ This is the code we had to create the database and table, nothing new here: //// -//// tab | Python 3.8+ +//// tab | Python 3.9+ ```{.python .annotate hl_lines="22" } -{!./docs_src/tutorial/create_db_and_table/tutorial003.py[ln:1-20]!} +{!./docs_src/tutorial/create_db_and_table/tutorial003_py39.py[ln:1-20]!} # More code here later 👈 -{!./docs_src/tutorial/create_db_and_table/tutorial003.py[ln:23-24]!} +{!./docs_src/tutorial/create_db_and_table/tutorial003_py39.py[ln:23-24]!} ``` {!./docs_src/tutorial/create_db_and_table/annotations/en/tutorial003.md!} diff --git a/docs_src/tutorial/create_db_and_table/tutorial001.py b/docs_src/tutorial/create_db_and_table/tutorial001_py39.py similarity index 100% rename from docs_src/tutorial/create_db_and_table/tutorial001.py rename to docs_src/tutorial/create_db_and_table/tutorial001_py39.py diff --git a/docs_src/tutorial/create_db_and_table/tutorial002.py b/docs_src/tutorial/create_db_and_table/tutorial002_py39.py similarity index 100% rename from docs_src/tutorial/create_db_and_table/tutorial002.py rename to docs_src/tutorial/create_db_and_table/tutorial002_py39.py diff --git a/docs_src/tutorial/create_db_and_table/tutorial003.py b/docs_src/tutorial/create_db_and_table/tutorial003_py39.py similarity index 100% rename from docs_src/tutorial/create_db_and_table/tutorial003.py rename to docs_src/tutorial/create_db_and_table/tutorial003_py39.py diff --git a/tests/test_tutorial/test_create_db_and_table/test_tutorial001.py b/tests/test_tutorial/test_create_db_and_table/test_tutorial001.py index 4aeeb64b..3e054bf3 100644 --- a/tests/test_tutorial/test_create_db_and_table/test_tutorial001.py +++ b/tests/test_tutorial/test_create_db_and_table/test_tutorial001.py @@ -8,7 +8,7 @@ from ...conftest import coverage_run, needs_py310 @pytest.mark.parametrize( "module_name", [ - "tutorial001", + "tutorial001_py39", pytest.param("tutorial001_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_create_db_and_table/test_tutorial002.py b/tests/test_tutorial/test_create_db_and_table/test_tutorial002.py index 0f1ad85f..f92bfee7 100644 --- a/tests/test_tutorial/test_create_db_and_table/test_tutorial002.py +++ b/tests/test_tutorial/test_create_db_and_table/test_tutorial002.py @@ -12,7 +12,7 @@ from ...conftest import needs_py310 @pytest.fixture( name="module", params=[ - "tutorial002", + "tutorial002_py39", pytest.param("tutorial002_py310", marks=needs_py310), ], ) diff --git a/tests/test_tutorial/test_create_db_and_table/test_tutorial003.py b/tests/test_tutorial/test_create_db_and_table/test_tutorial003.py index 446feae7..e11e0a04 100644 --- a/tests/test_tutorial/test_create_db_and_table/test_tutorial003.py +++ b/tests/test_tutorial/test_create_db_and_table/test_tutorial003.py @@ -12,7 +12,7 @@ from ...conftest import needs_py310 @pytest.fixture( name="module", params=[ - "tutorial003", + "tutorial003_py39", pytest.param("tutorial003_py310", marks=needs_py310), ], )