Skip to content

Make BaseValidationError base static in Python < 3.11 #379

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions src/cattrs/_compat.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import builtins
import sys
from collections import deque
from collections.abc import MutableSet as AbcMutableSet
Expand Down Expand Up @@ -62,10 +61,10 @@ def get_origin(cl):
else:
from typing import Final, Protocol, get_args, get_origin

if "ExceptionGroup" not in dir(builtins):
from exceptiongroup import ExceptionGroup
else:
if is_py311_plus:
ExceptionGroup = ExceptionGroup
else:
from exceptiongroup import ExceptionGroup as ExceptionGroup # noqa: PLC0414


def has(cls):
Expand Down