diff --git a/aio_pika/queue.py b/aio_pika/queue.py index 9b4cd3de..75e28ad3 100644 --- a/aio_pika/queue.py +++ b/aio_pika/queue.py @@ -8,7 +8,10 @@ import aiormq from aiormq.abc import DeliveredMessage -from exceptiongroup import ExceptionGroup +try: + ExceptionGroup +except NameError: + from exceptiongroup import ExceptionGroup from pamqp.common import Arguments from .abc import ( diff --git a/pyproject.toml b/pyproject.toml index 1bc76c43..9e18de10 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,7 +39,7 @@ packages = [{ include = "aio_pika" }] python = "^3.9" aiormq = "~6.8.0" yarl = [{ version = '*'}] -exceptiongroup = "^1" +exceptiongroup = [{ version = "^1", python = "< 3.11" }] typing_extensions = [{ version = '*', python = "< 3.10" }] [tool.poetry.group.dev.dependencies]