Skip to content

Commit

Permalink
Merge pull request #525 from actionless/patch-1
Browse files Browse the repository at this point in the history
fix(event): don't attempt to import `exceptiongroup` if running python 3.11+
  • Loading branch information
danyeaw authored Jul 1, 2024
2 parents 7d2c52b + 13bdb45 commit 378009e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion generic/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 3 additions & 1 deletion tests/test_event_exception.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
from __future__ import annotations

from sys import version_info
from typing import Callable

import pytest
from exceptiongroup import ExceptionGroup
if version_info < (3, 11):
from exceptiongroup import ExceptionGroup

from generic.event import Event, Manager

Expand Down

0 comments on commit 378009e

Please sign in to comment.