-
-
Notifications
You must be signed in to change notification settings - Fork 345
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
Remove MultiError
and set strict_exception_groups=True
by default
#2785
Comments
In #2301 you previously said
Unless this issue is just to prep for a release in a year, this seems like moving up the date of the transition quite a bit. |
Yep, I now think we should change the default substantially sooner than I proposed last year. What changed?
If we wait another year, I'm concerned that we'll 'miss the wave'; if we catch it then I think support for Trio could end up standard in most async libraries. I've spoken to many maintainers who are interested in moving from asyncio to anyio, to support some mix of Trio users and TaskGroup-on-older-Pythons. IMO we need to be ready in time for mass adoption of Python 3.11, and that means starting ASAP. |
All the major tasks are now resolved, only waiting on 0.23 to be released before going ahead with a PR for this. If anybody wants to consider the subtasks of looking for or documenting design patterns regarding inner nurseries it'd be lovely. |
scanned for calls to
I'm far from an expert on parsing concurrency code though, so if any of the above sounds strange please double-check it. |
Closing this issue, see #2929 for the remaining docs tasks. And my sincere thanks again to everyone who contributed! |
Goal
Our long-term goal is for Trio and our users to use the builtin
ExceptionGroup
type andexcept*
syntax, and to always raiseExceptionGroup
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 ofstrict_exception_groups
toTrue
, to match the behavior of asyncio and anyioTaskGroup
.Later, when
strict_exception_groups=False
has become very rare or Python 3.10 reaches end of life, we'll remove thestrict_exception_groups
argument entirely. That's a future issue!Timing and todos
With the growing popularity of
ExceptionGroup
in general andanyio
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:anyio
4.0, which uses the standardExceptionGroup
typeExceptionGroup
so we can remove our workaround Remove special handling due to IPython lacking support for exception groups #2702strict_exception_groups=True
"leaks" the implementation-detail nursery innursery.start(fn)
#2611apport
monkeypatch to theexceptiongroup
backport, Add exceptiongroup support to third party projects agronholm/exceptiongroup#23 / monkeypatch apport excepthook agronholm/exceptiongroup#88The text was updated successfully, but these errors were encountered: