Skip to content

Commit

Permalink
Avoid depending on typing_extensions where not needed
Browse files Browse the repository at this point in the history
  • Loading branch information
zware committed Nov 27, 2024
1 parent e610621 commit 1de6e3d
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions aio_pika/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import asyncio
import inspect
import typing
import warnings
from functools import wraps
from itertools import chain
Expand All @@ -11,10 +12,16 @@
List,
MutableSet, Optional, TypeVar, Union, Generic,
)

from typing_extensions import ParamSpec, Protocol
from weakref import ReferenceType, WeakSet, ref

if typing.TYPE_CHECKING:
from typing_extensions import ParamSpec, Protocol
else:
try:
from typing import ParamSpec, Protocol
except ImportError:
from typing_extensions import ParamSpec, Protocol

from aio_pika.log import get_logger


Expand Down

0 comments on commit 1de6e3d

Please sign in to comment.