Skip to content

Commit

Permalink
fix py310 error because of typing_extensions not installed.
Browse files Browse the repository at this point in the history
  • Loading branch information
waketzheng committed Aug 31, 2024
1 parent 4ce7b1d commit db0d1d8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion asyncer/_compat.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
# AnyIO 4.1.0 renamed cancellable to abandon_on_cancel
import importlib
import importlib.metadata
import sys
from typing import Callable, TypeVar, Union

import anyio
import anyio.to_thread
from anyio import CapacityLimiter
from typing_extensions import TypeVarTuple, Unpack

if sys.version_info >= (3, 11):
from typing import TypeVarTuple, Unpack
else:
from typing_extensions import TypeVarTuple, Unpack

ANYIO_VERSION = importlib.metadata.version("anyio")

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ classifiers = [
]
dependencies = [
"anyio >=3.4.0,<5.0",
"typing_extensions >=4.8.0; python_version < '3.10'"
"typing_extensions >=4.8.0; python_version < '3.11'"
]

[project.urls]
Expand Down

0 comments on commit db0d1d8

Please sign in to comment.