python-trio / python-trio/trio

throw unraisable exceptions out of trio.run if possible

Open
#2,379 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
7.3k
Forks
431
Avg merge
2d 17h
Merged PRs (30d)
6

Description

trio sometimes intentionally raises Unraisable exceptions while the system nursery is running - eg asyncgen finalization

I think instead it should throw them into the system nursery
and if it can't throw them into the nursery (the one-tick window after the system-nursery is closed) it should throw them out of run
only if it can't throw them out of run it should only then throw them into sys.unraisablehook

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how Trio handles unraisable exceptions while the system nursery is running, including async-generator finalization and the one-tick window after nursery closure. Done means exceptions are sent to the system nursery when possible, then out of trio.run, and only finally to sys.unraisablehook.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.