Skip to content
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

Python 3.11: traceback_exception_init() has new keyword arguments #2270

Merged
merged 4 commits into from
May 15, 2022
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
6 changes: 3 additions & 3 deletions trio/_core/_multierror.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,11 +383,10 @@ def traceback_exception_init(
capture_locals=False,
compact=False,
_seen=None,
**kwargs,
):
if sys.version_info >= (3, 10):
kwargs = {"compact": compact}
else:
kwargs = {}
kwargs["compact"] = compact

# Capture the original exception and its cause and context as TracebackExceptions
traceback_exception_original_init(
Expand Down Expand Up @@ -421,6 +420,7 @@ def traceback_exception_init(
# copy the set of _seen exceptions so that duplicates
# shared between sub-exceptions are not omitted
_seen=None if seen_was_none else set(_seen),
**kwargs,
)
)
self.embedded = embedded
Expand Down