Skip to content

Commit de48e77

Browse files
authored
feat: drop support for Python3.8 (#1848)
* feat: drop support for Python 3.8 * Use `functools.cache` instead of lru_cache * chore: upgrade deps
1 parent 71624e7 commit de48e77

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+1862
-1856
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
TORTOISE_MSSQL_DRIVER: ODBC Driver 18 for SQL Server
4646
strategy:
4747
matrix:
48-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
48+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
4949
steps:
5050
- uses: actions/cache@v4
5151
with:

.github/workflows/gh-pages-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ jobs:
77
publish:
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/checkout@v3
11-
- uses: actions/setup-python@v4
10+
- uses: actions/checkout@v4
11+
- uses: actions/setup-python@v5
1212
with:
1313
python-version: "3.9"
1414
- name: Install and configure Poetry

.github/workflows/gh-pages.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ jobs:
88
publish:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v3
12-
- uses: actions/setup-python@v4
11+
- uses: actions/checkout@v4
12+
- uses: actions/setup-python@v5
1313
with:
1414
python-version: "3.9"
1515
- name: Install and configure Poetry

.github/workflows/pypi.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ jobs:
77
publish:
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/checkout@v3
11-
- uses: actions/setup-python@v4
10+
- uses: actions/checkout@v4
11+
- uses: actions/setup-python@v5
1212
with:
1313
python-version: '3.9'
1414
- name: Install and configure Poetry

CHANGELOG.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@ Fixed
1515
^^^^^
1616
- Rename pypika to pypika_tortoise for fixing package name conflict (#1829)
1717
- Concurrent connection pool initialization (#1825)
18+
1819
Changed
1920
^^^^^^^
21+
- Drop support for Python3.8 (#1848)
2022
- Optimize field conversion to database format to speed up `create` and `bulk_create` (#1840)
2123
- Improved query performance by optimizing SQL generation (#1837)
2224

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ You can find the docs at `Documentation <https://tortoise.github.io>`_
2929
Tortoise ORM is a young project and breaking changes are to be expected.
3030
We keep a `Changelog <https://tortoise.github.io/CHANGELOG.html>`_ and it will have possible breakage clearly documented.
3131

32-
Tortoise ORM is supported on CPython >= 3.8 for SQLite, MySQL and PostgreSQL and Microsoft SQL Server and Oracle.
32+
Tortoise ORM is supported on CPython >= 3.9 for SQLite, MySQL and PostgreSQL and Microsoft SQL Server and Oracle.
3333

3434
Why was Tortoise ORM built?
3535
---------------------------

docs/CONTRIBUTING.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ Tortoise ORM follows a the following agreed upon style:
9999
* Always try to separate out terms clearly rather than concatenate words directly:
100100
* ``some_purpose`` instead of ``somepurpose``
101101
* ``SomePurpose`` instead of ``Somepurpose``
102-
* Keep in mind the targeted Python versions of ``>=3.8``:
102+
* Keep in mind the targeted Python versions of ``>=3.9``:
103103
* Do use f-strings
104104
* Please try and provide type annotations where you can, it will improve auto-completion in editors, and better static analysis.
105105

docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ It's engraved in it's design that you are working not with just tables, you work
1313

1414
Source & issue trackers are available at `<https://github.com/tortoise/tortoise-orm/>`_
1515

16-
Tortoise ORM is supported on CPython >= 3.8 for SQLite, MySQL and PostgreSQL.
16+
Tortoise ORM is supported on CPython >= 3.9 for SQLite, MySQL and PostgreSQL.
1717

1818
Introduction
1919
============

examples/fastapi/_tests.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
# pylint: disable=E0611,E0401
33
import multiprocessing
44
import os
5+
from collections.abc import AsyncGenerator
56
from concurrent.futures import ProcessPoolExecutor
67
from contextlib import asynccontextmanager
78
from datetime import datetime
89
from pathlib import Path
9-
from typing import AsyncGenerator, Tuple
1010

1111
import anyio
1212
import pytest
@@ -74,7 +74,7 @@ async def create_user(self, async_client: AsyncClient) -> Users:
7474
assert user_obj.id == user_id
7575
return user_obj
7676

77-
async def user_list(self, async_client: AsyncClient) -> Tuple[datetime, Users, User_Pydantic]:
77+
async def user_list(self, async_client: AsyncClient) -> tuple[datetime, Users, User_Pydantic]:
7878
utc_now = datetime.now(pytz.utc)
7979
user_obj = await Users.create(username="test")
8080
response = await async_client.get("/users")

examples/fastapi/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# pylint: disable=E0611,E0401
22
import os
3+
from collections.abc import AsyncGenerator
34
from contextlib import asynccontextmanager
4-
from typing import AsyncGenerator
55

66
from fastapi import FastAPI
77
from routers import router as users_router

0 commit comments

Comments
 (0)