Skip to content

Commit 94471ce

Browse files
committed
chore: explicitly add anyio to dependencies
1 parent 08c2421 commit 94471ce

File tree

3 files changed

+265
-259
lines changed

3 files changed

+265
-259
lines changed

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ dependencies = [
1111
"pypika-tortoise (>=0.6.3,<1.0.0)",
1212
"iso8601 (>=2.1.0,<3.0.0); python_version < '4.0'",
1313
"aiosqlite (>=0.16.0,<1.0.0)",
14+
"anyio",
1415
"pytz",
15-
# Typing support for older Python
16-
"typing-extensions (>= 4.1.0)",
16+
"typing-extensions (>= 4.1.0); python_version < '3.11'",
1717
]
1818
classifiers = [
1919
"License :: OSI Approved :: Apache Software License",

tortoise/filters.py

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

33
import operator
4+
import sys
45
from collections.abc import Callable, Iterable, Sequence
56
from functools import partial
67
from typing import TYPE_CHECKING, Any, TypedDict
@@ -16,12 +17,16 @@
1617
Term,
1718
ValueWrapper,
1819
)
19-
from typing_extensions import NotRequired
2020

2121
from tortoise.contrib.postgres.fields import ArrayField
2222
from tortoise.fields import Field, JSONField
2323
from tortoise.fields.relational import BackwardFKRelation, ManyToManyFieldInstance
2424

25+
if sys.version_info >= (3, 11): # pragma:nocoverage
26+
from typing import NotRequired
27+
else:
28+
from typing_extensions import NotRequired
29+
2530
if TYPE_CHECKING: # pragma: nocoverage
2631
from tortoise.models import Model
2732

0 commit comments

Comments
 (0)