Skip to content

Commit f0309c9

Browse files
authored
feat: drop support python3.8 (#446)
1 parent 9c3ba7e commit f0309c9

File tree

4 files changed

+409
-495
lines changed

4 files changed

+409
-495
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,11 @@ jobs:
2020
options: --health-cmd=pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
2121
strategy:
2222
matrix:
23-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
23+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
2424
tortoise-orm:
25-
- tortoise021
26-
- tortoise022
27-
- tortoise023
2825
- tortoise024
29-
# TODO: add dev back when drop python3.8 support
30-
# - tortoisedev
26+
- tortoise025
27+
- tortoisedev
3128
steps:
3229
- name: Start MySQL
3330
run: sudo systemctl start mysql.service
@@ -44,41 +41,21 @@ jobs:
4441
- name: Install and configure Poetry
4542
run: |
4643
pip install -U pip
47-
if [[ "${{ matrix.python-version }}" == "3.8" ]]; then
48-
# poetry2.0+ does not support installed by python3.8, but can manage project using py38
49-
python3.12 -m pip install "poetry>=2.0"
50-
else
51-
pip install "poetry>=2.0"
52-
fi
44+
pip install "poetry>=2.0"
5345
poetry env use python${{ matrix.python-version }}
5446
- name: Install dependencies and check style
5547
run: poetry run make check
56-
- name: Install TortoiseORM v0.21
57-
if: matrix.tortoise-orm == 'tortoise021'
58-
run: poetry run pip install --upgrade "tortoise-orm>=0.21,<0.22"
59-
- name: Install TortoiseORM v0.22
60-
if: matrix.tortoise-orm == 'tortoise022'
61-
run: poetry run pip install --upgrade "tortoise-orm>=0.22,<0.23"
62-
- name: Install TortoiseORM v0.23
63-
if: matrix.tortoise-orm == 'tortoise023'
64-
run: poetry run pip install --upgrade "tortoise-orm>=0.23,<0.24"
6548
- name: Install TortoiseORM v0.24
6649
if: matrix.tortoise-orm == 'tortoise024'
67-
run: |
68-
if [[ "${{ matrix.python-version }}" == "3.8" ]]; then
69-
echo "Skip test for tortoise v0.24 as it does not support Python3.8"
70-
else
71-
poetry run pip install --upgrade "tortoise-orm>=0.24,<0.25"
72-
fi
50+
run: poetry run pip install --upgrade "tortoise-orm>=0.24,<0.25"
51+
- name: Install TortoiseORM v0.25
52+
if: matrix.tortoise-orm == 'tortoise025'
53+
run: poetry run pip install --upgrade "tortoise-orm>=0.25,<0.26"
7354
- name: Install TortoiseORM develop branch
7455
if: matrix.tortoise-orm == 'tortoisedev'
7556
run: |
76-
if [[ "${{ matrix.python-version }}" == "3.8" ]]; then
77-
echo "Skip test for tortoise develop branch as it does not support Python3.8"
78-
else
79-
poetry run pip uninstall -y tortoise-orm
80-
poetry run pip install --upgrade "git+https://github.com/tortoise/tortoise-orm"
81-
fi
57+
poetry run pip uninstall -y tortoise-orm
58+
poetry run pip install --upgrade "git+https://github.com/tortoise/tortoise-orm"
8259
- name: CI
8360
env:
8461
MYSQL_PASS: root
@@ -90,7 +67,7 @@ jobs:
9067
run: poetry run make _testall
9168
- name: Verify aiomysql support
9269
# Only check the latest version of tortoise
93-
if: matrix.tortoise-orm == 'tortoise024'
70+
if: matrix.tortoise-orm == 'tortoisedev'
9471
run: |
9572
poetry run pip uninstall -y asyncmy
9673
poetry run make test_mysql
@@ -101,7 +78,7 @@ jobs:
10178
MYSQL_PORT: 3306
10279
- name: Verify psycopg support
10380
# Only check the latest version of tortoise
104-
if: matrix.tortoise-orm == 'tortoise024'
81+
if: matrix.tortoise-orm == 'tortoisedev'
10582
run: poetry run make test_psycopg
10683
env:
10784
POSTGRES_PASS: 123456

aerich/inspectdb/__init__.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from __future__ import annotations
22

33
import contextlib
4-
from typing import Any, Callable, Dict, TypedDict
4+
from typing import Any, Callable, TypedDict
55

66
from pydantic import BaseModel
77
from tortoise import BaseDBAsyncClient
@@ -17,8 +17,7 @@ class ColumnInfoDict(TypedDict):
1717
comment: str
1818

1919

20-
# TODO: use dict to replace typing.Dict when dropping support for Python3.8
21-
FieldMapDict = Dict[str, Callable[..., str]]
20+
FieldMapDict = dict[str, Callable[..., str]]
2221

2322

2423
class Column(BaseModel):

0 commit comments

Comments
 (0)