mirror of
https://github.com/fastapi/sqlmodel.git
synced 2026-03-13 09:29:54 +08:00
➖ Drop support for Python 3.8 in CI and docs (#1695)
Co-authored-by: Yurii Motov <yurii.motov.monte@gmail.com> Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
d7b596b1dd
commit
afc0c324cf
@@ -5,7 +5,7 @@ from types import ModuleType
|
||||
|
||||
import pytest
|
||||
|
||||
from tests.conftest import needs_py39, needs_py310
|
||||
from tests.conftest import needs_py310
|
||||
|
||||
|
||||
@dataclass
|
||||
@@ -17,8 +17,7 @@ class Modules:
|
||||
@pytest.fixture(
|
||||
name="modules_path",
|
||||
params=[
|
||||
"tutorial001",
|
||||
pytest.param("tutorial001_py39", marks=needs_py39),
|
||||
pytest.param("tutorial001_py39"),
|
||||
pytest.param("tutorial001_py310", marks=needs_py310),
|
||||
],
|
||||
)
|
||||
|
||||
@@ -5,7 +5,7 @@ from types import ModuleType
|
||||
|
||||
import pytest
|
||||
|
||||
from tests.conftest import needs_py39, needs_py310
|
||||
from tests.conftest import needs_py310
|
||||
|
||||
|
||||
@dataclass
|
||||
@@ -17,8 +17,7 @@ class Modules:
|
||||
@pytest.fixture(
|
||||
name="modules_path",
|
||||
params=[
|
||||
"tutorial001",
|
||||
pytest.param("tutorial001_py39", marks=needs_py39),
|
||||
pytest.param("tutorial001_py39"),
|
||||
pytest.param("tutorial001_py310", marks=needs_py310),
|
||||
],
|
||||
)
|
||||
@@ -35,7 +34,7 @@ def load_modules(clear_sqlmodel, modules_path: str) -> Modules:
|
||||
app_mod = sys.modules[app_mod_path]
|
||||
importlib.reload(app_mod)
|
||||
else:
|
||||
app_mod = importlib.import_module(app_mod_path)
|
||||
app_mod = importlib.import_module(app_mod_path) # pragma: no cover
|
||||
test_mod = importlib.import_module(f"{modules_path}.test_main_002")
|
||||
return Modules(app=app_mod, test=test_mod)
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ from types import ModuleType
|
||||
|
||||
import pytest
|
||||
|
||||
from tests.conftest import needs_py39, needs_py310
|
||||
from tests.conftest import needs_py310
|
||||
|
||||
|
||||
@dataclass
|
||||
@@ -17,8 +17,7 @@ class Modules:
|
||||
@pytest.fixture(
|
||||
name="modules_path",
|
||||
params=[
|
||||
"tutorial001",
|
||||
pytest.param("tutorial001_py39", marks=needs_py39),
|
||||
pytest.param("tutorial001_py39"),
|
||||
pytest.param("tutorial001_py310", marks=needs_py310),
|
||||
],
|
||||
)
|
||||
@@ -35,7 +34,7 @@ def load_modules(clear_sqlmodel, modules_path: str) -> Modules:
|
||||
app_mod = sys.modules[app_mod_path]
|
||||
importlib.reload(app_mod)
|
||||
else:
|
||||
app_mod = importlib.import_module(app_mod_path)
|
||||
app_mod = importlib.import_module(app_mod_path) # pragma: no cover
|
||||
test_mod = importlib.import_module(f"{modules_path}.test_main_003")
|
||||
return Modules(app=app_mod, test=test_mod)
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ from types import ModuleType
|
||||
|
||||
import pytest
|
||||
|
||||
from tests.conftest import needs_py39, needs_py310
|
||||
from tests.conftest import needs_py310
|
||||
|
||||
|
||||
@dataclass
|
||||
@@ -17,8 +17,7 @@ class Modules:
|
||||
@pytest.fixture(
|
||||
name="modules_path",
|
||||
params=[
|
||||
"tutorial001",
|
||||
pytest.param("tutorial001_py39", marks=needs_py39),
|
||||
pytest.param("tutorial001_py39"),
|
||||
pytest.param("tutorial001_py310", marks=needs_py310),
|
||||
],
|
||||
)
|
||||
@@ -35,7 +34,7 @@ def load_modules(clear_sqlmodel, modules_path: str) -> Modules:
|
||||
app_mod = sys.modules[app_mod_path]
|
||||
importlib.reload(app_mod)
|
||||
else:
|
||||
app_mod = importlib.import_module(app_mod_path)
|
||||
app_mod = importlib.import_module(app_mod_path) # pragma: no cover
|
||||
test_mod = importlib.import_module(f"{modules_path}.test_main_004")
|
||||
return Modules(app=app_mod, test=test_mod)
|
||||
|
||||
|
||||
@@ -3,9 +3,11 @@ import importlib
|
||||
import pytest
|
||||
from sqlmodel import Session
|
||||
|
||||
from docs_src.tutorial.fastapi.app_testing.tutorial001 import main as app_mod
|
||||
from docs_src.tutorial.fastapi.app_testing.tutorial001 import test_main_005 as test_mod
|
||||
from docs_src.tutorial.fastapi.app_testing.tutorial001.test_main_005 import (
|
||||
from docs_src.tutorial.fastapi.app_testing.tutorial001_py39 import main as app_mod
|
||||
from docs_src.tutorial.fastapi.app_testing.tutorial001_py39 import (
|
||||
test_main_005 as test_mod,
|
||||
)
|
||||
from docs_src.tutorial.fastapi.app_testing.tutorial001_py39.test_main_005 import (
|
||||
session_fixture,
|
||||
)
|
||||
|
||||
|
||||
@@ -4,9 +4,11 @@ import pytest
|
||||
from fastapi.testclient import TestClient
|
||||
from sqlmodel import Session
|
||||
|
||||
from docs_src.tutorial.fastapi.app_testing.tutorial001 import main as app_mod
|
||||
from docs_src.tutorial.fastapi.app_testing.tutorial001 import test_main_006 as test_mod
|
||||
from docs_src.tutorial.fastapi.app_testing.tutorial001.test_main_006 import (
|
||||
from docs_src.tutorial.fastapi.app_testing.tutorial001_py39 import main as app_mod
|
||||
from docs_src.tutorial.fastapi.app_testing.tutorial001_py39 import (
|
||||
test_main_006 as test_mod,
|
||||
)
|
||||
from docs_src.tutorial.fastapi.app_testing.tutorial001_py39.test_main_006 import (
|
||||
client_fixture,
|
||||
session_fixture,
|
||||
)
|
||||
|
||||
@@ -5,14 +5,13 @@ from types import ModuleType
|
||||
|
||||
import pytest
|
||||
|
||||
from ....conftest import needs_py39, needs_py310
|
||||
from ....conftest import needs_py310
|
||||
|
||||
|
||||
@pytest.fixture(
|
||||
name="module",
|
||||
params=[
|
||||
"tutorial001",
|
||||
pytest.param("tutorial001_py39", marks=needs_py39),
|
||||
pytest.param("tutorial001_py39"),
|
||||
pytest.param("tutorial001_py310", marks=needs_py310),
|
||||
],
|
||||
)
|
||||
|
||||
@@ -7,14 +7,13 @@ from fastapi.testclient import TestClient
|
||||
from sqlmodel import create_engine
|
||||
from sqlmodel.pool import StaticPool
|
||||
|
||||
from tests.conftest import needs_py39, needs_py310
|
||||
from tests.conftest import needs_py310
|
||||
|
||||
|
||||
@pytest.fixture(
|
||||
name="module",
|
||||
params=[
|
||||
"tutorial001",
|
||||
pytest.param("tutorial001_py39", marks=needs_py39),
|
||||
pytest.param("tutorial001_py39"),
|
||||
pytest.param("tutorial001_py310", marks=needs_py310),
|
||||
],
|
||||
)
|
||||
|
||||
@@ -7,14 +7,13 @@ from fastapi.testclient import TestClient
|
||||
from sqlmodel import create_engine
|
||||
from sqlmodel.pool import StaticPool
|
||||
|
||||
from tests.conftest import needs_py39, needs_py310
|
||||
from tests.conftest import needs_py310
|
||||
|
||||
|
||||
@pytest.fixture(
|
||||
name="module",
|
||||
params=[
|
||||
"tutorial001",
|
||||
pytest.param("tutorial001_py39", marks=needs_py39),
|
||||
pytest.param("tutorial001_py39"),
|
||||
pytest.param("tutorial001_py310", marks=needs_py310),
|
||||
],
|
||||
)
|
||||
|
||||
@@ -9,14 +9,13 @@ from sqlalchemy.engine.reflection import Inspector
|
||||
from sqlmodel import create_engine
|
||||
from sqlmodel.pool import StaticPool
|
||||
|
||||
from tests.conftest import needs_py39, needs_py310
|
||||
from tests.conftest import needs_py310
|
||||
|
||||
|
||||
@pytest.fixture(
|
||||
name="module",
|
||||
params=[
|
||||
"tutorial001",
|
||||
pytest.param("tutorial001_py39", marks=needs_py39),
|
||||
pytest.param("tutorial001_py39"),
|
||||
pytest.param("tutorial001_py310", marks=needs_py310),
|
||||
],
|
||||
)
|
||||
|
||||
@@ -9,14 +9,13 @@ from sqlalchemy.engine.reflection import Inspector
|
||||
from sqlmodel import create_engine
|
||||
from sqlmodel.pool import StaticPool
|
||||
|
||||
from tests.conftest import needs_py39, needs_py310
|
||||
from tests.conftest import needs_py310
|
||||
|
||||
|
||||
@pytest.fixture(
|
||||
name="module",
|
||||
params=[
|
||||
"tutorial002",
|
||||
pytest.param("tutorial002_py39", marks=needs_py39),
|
||||
pytest.param("tutorial002_py39"),
|
||||
pytest.param("tutorial002_py310", marks=needs_py310),
|
||||
],
|
||||
)
|
||||
|
||||
@@ -7,14 +7,13 @@ from fastapi.testclient import TestClient
|
||||
from sqlmodel import create_engine
|
||||
from sqlmodel.pool import StaticPool
|
||||
|
||||
from tests.conftest import needs_py39, needs_py310
|
||||
from tests.conftest import needs_py310
|
||||
|
||||
|
||||
@pytest.fixture(
|
||||
name="module",
|
||||
params=[
|
||||
"tutorial001",
|
||||
pytest.param("tutorial001_py39", marks=needs_py39),
|
||||
pytest.param("tutorial001_py39"),
|
||||
pytest.param("tutorial001_py310", marks=needs_py310),
|
||||
],
|
||||
)
|
||||
|
||||
@@ -7,14 +7,13 @@ from fastapi.testclient import TestClient
|
||||
from sqlmodel import create_engine
|
||||
from sqlmodel.pool import StaticPool
|
||||
|
||||
from tests.conftest import needs_py39, needs_py310
|
||||
from tests.conftest import needs_py310
|
||||
|
||||
|
||||
@pytest.fixture(
|
||||
name="module",
|
||||
params=[
|
||||
"tutorial001",
|
||||
pytest.param("tutorial001_py39", marks=needs_py39),
|
||||
pytest.param("tutorial001_py39"),
|
||||
pytest.param("tutorial001_py310", marks=needs_py310),
|
||||
],
|
||||
)
|
||||
|
||||
@@ -7,14 +7,13 @@ from fastapi.testclient import TestClient
|
||||
from sqlmodel import create_engine
|
||||
from sqlmodel.pool import StaticPool
|
||||
|
||||
from tests.conftest import needs_py39, needs_py310
|
||||
from tests.conftest import needs_py310
|
||||
|
||||
|
||||
@pytest.fixture(
|
||||
name="module",
|
||||
params=[
|
||||
"tutorial001",
|
||||
pytest.param("tutorial001_py39", marks=needs_py39),
|
||||
pytest.param("tutorial001_py39"),
|
||||
pytest.param("tutorial001_py310", marks=needs_py310),
|
||||
],
|
||||
)
|
||||
|
||||
@@ -7,14 +7,13 @@ from fastapi.testclient import TestClient
|
||||
from sqlmodel import create_engine
|
||||
from sqlmodel.pool import StaticPool
|
||||
|
||||
from tests.conftest import needs_py39, needs_py310
|
||||
from tests.conftest import needs_py310
|
||||
|
||||
|
||||
@pytest.fixture(
|
||||
name="module",
|
||||
params=[
|
||||
"tutorial001",
|
||||
pytest.param("tutorial001_py39", marks=needs_py39),
|
||||
pytest.param("tutorial001_py39"),
|
||||
pytest.param("tutorial001_py310", marks=needs_py310),
|
||||
],
|
||||
)
|
||||
|
||||
@@ -13,7 +13,7 @@ from tests.conftest import needs_py310
|
||||
@pytest.fixture(
|
||||
name="module",
|
||||
params=[
|
||||
"tutorial001",
|
||||
pytest.param("tutorial001_py39"),
|
||||
pytest.param("tutorial001_py310", marks=needs_py310),
|
||||
],
|
||||
)
|
||||
|
||||
@@ -7,14 +7,13 @@ from fastapi.testclient import TestClient
|
||||
from sqlmodel import create_engine
|
||||
from sqlmodel.pool import StaticPool
|
||||
|
||||
from tests.conftest import needs_py39, needs_py310
|
||||
from tests.conftest import needs_py310
|
||||
|
||||
|
||||
@pytest.fixture(
|
||||
name="module",
|
||||
params=[
|
||||
"tutorial001",
|
||||
pytest.param("tutorial001_py39", marks=needs_py39),
|
||||
pytest.param("tutorial001_py39"),
|
||||
pytest.param("tutorial001_py310", marks=needs_py310),
|
||||
],
|
||||
)
|
||||
|
||||
@@ -7,14 +7,13 @@ from fastapi.testclient import TestClient
|
||||
from sqlmodel import create_engine
|
||||
from sqlmodel.pool import StaticPool
|
||||
|
||||
from tests.conftest import needs_py39, needs_py310
|
||||
from tests.conftest import needs_py310
|
||||
|
||||
|
||||
@pytest.fixture(
|
||||
name="module",
|
||||
params=[
|
||||
"tutorial001",
|
||||
pytest.param("tutorial001_py39", marks=needs_py39),
|
||||
pytest.param("tutorial001_py39"),
|
||||
pytest.param("tutorial001_py310", marks=needs_py310),
|
||||
],
|
||||
)
|
||||
|
||||
@@ -7,14 +7,13 @@ from fastapi.testclient import TestClient
|
||||
from sqlmodel import Session, create_engine
|
||||
from sqlmodel.pool import StaticPool
|
||||
|
||||
from tests.conftest import needs_py39, needs_py310
|
||||
from tests.conftest import needs_py310
|
||||
|
||||
|
||||
@pytest.fixture(
|
||||
name="module",
|
||||
params=[
|
||||
"tutorial002",
|
||||
pytest.param("tutorial002_py39", marks=needs_py39),
|
||||
pytest.param("tutorial002_py39"),
|
||||
pytest.param("tutorial002_py310", marks=needs_py310),
|
||||
],
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user