Repository navigation
Only await awaitable Trio event handler results - #217
Merged
jfhbrook merged 1 commit intoOct 18, 2026
Merged
Conversation
Owner
|
I've gotten a number of AI assisted code contributions, and in light of that, I have a new checklist I'd like developers to run through:
Some details on this are in Anyway: If you can run through this checklist for me, I'd be much appreciative. Thanks! |
Owner
|
Also, if you are using AI, you may be interested in implementing AI skills/workflows and other agent/prompt files: #219 |
adenzhou1350
force-pushed
the
codex/fix-trio-sync-handlers
branch
from
October 17, 2026 22:20
2d02994 to
07086e3
Compare
jfhbrook
force-pushed
the
codex/fix-trio-sync-handlers
branch
from
October 17, 2026 23:51
94ea753 to
289a0c5
Compare
jfhbrook
force-pushed
the
codex/fix-trio-sync-handlers
branch
from
October 17, 2026 23:57
289a0c5 to
8f292d9
Compare
Owner
|
Released in 15.0.0. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TrioEventEmitterunconditionally awaits each handler's return value.A successful synchronous handler therefore emits a spurious
TypeErrorafterdoing its work. A synchronous error handler can generate another error, and two
pending emits of an async
oncelistener fail when the second wrapper correctlyreturns
Nonewithout invoking the listener again.Call the handler as before, but await its result only when it is awaitable. The
existing exception-to-error dispatch remains in place; no thread offloading or
new scheduling policy is added.
Add regressions for synchronous
on/oncehandlers, duplicate pendingoncedelivery, and a synchronous error handler. Update the changelog.
Validation on CPython 3.12.13 / Trio 0.34.0:
Trio tests pass. Patched source: the complete 48-test suite passes, including
asyncio, executor, Twisted, synchronous and uplift tests.
patched source passes all five. This is not the full Linux pytest suite.
pyee,testsanddocs;git diff --checkpasses.Other Python versions, Pyright and documentation builds were not run.
AI-assisted implementation and verification.