Skip to content

Remove MultiError and set strict_exception_groups=True by default #2785

Closed
@Zac-HD

Description

@Zac-HD

Goal

Our long-term goal is for Trio and our users to use the builtin ExceptionGroup type and except* syntax, and to always raise ExceptionGroup where we might ever do so. #2213 started moving us towards this goal, following discussion in #2211 (and #611), and this issue is about how and when we might finish it.

Proposal

Remove MultiError, using the builtin (or backported) ExceptionGroup type and catching logic instead. At the same time, change the default value of strict_exception_groups to True, to match the behavior of asyncio and anyio TaskGroup.

Later, when strict_exception_groups=False has become very rare or Python 3.10 reaches end of life, we'll remove the strict_exception_groups argument entirely. That's a future issue!

Timing and todos

With the growing popularity of ExceptionGroup in general and anyio in particular, I'm keen to ship this in the next few months - making Trio as "normal" as possible makes it much easier for prospective users to adopt and learn. That said, I think there are a few things we should or could get done first:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions