From f9623421c7bf26787c257cdbd1f8f70cf24d26d5 Mon Sep 17 00:00:00 2001 From: Actionless Loveless Date: Sun, 30 Jun 2024 22:01:43 +0200 Subject: [PATCH] fix(event): don't attempt to import `exceptiongroup` if running python 3.11+ --- generic/event.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/generic/event.py b/generic/event.py index 49ee53c..8f63b4d 100644 --- a/generic/event.py +++ b/generic/event.py @@ -3,9 +3,11 @@ This module provides API for event management. """ +from sys import version_info from typing import Callable, Set, Type -from exceptiongroup import ExceptionGroup +if version_info < (3, 11): + from exceptiongroup import ExceptionGroup from generic.registry import Registry, TypeAxis