Repository navigation
🤖 AsyncIOEventEmitter Emits Falsey Errors - #229
Merged
Merged
Conversation
jfhbrook
marked this pull request as ready for review
October 30, 2026 19:43
jfhbrook
force-pushed
the
fix-asyncio-exception-truthiness
branch
from
October 30, 2026 20:00
a8c33bd to
e897b3c
Compare
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.
What Is This?
Preserve asynchronous handler errors regardless of their truthiness by checking the
Nonesentinel returned byFuture.exception()directly.Add regression tests for both coroutine handlers and returned futures, covering exception types whose
__bool__returnsFalseor raises. The tests assert that the original exception object reaches theerrorlistener.Why Is This?
The asyncio completion callback currently uses
if exc. An exception with__bool__returningFalseis silently discarded instead of reaching theerrorlistener. If__bool__raises, the callback fails with that new error instead.Using
if exc is not Nonepreserves the original exception object without evaluating its truth value. Successful and cancelled futures keep their existing behavior.Anything We Need To Know?
AI coding assistants were used for this contribution, including the implementation and independent review. The commit subject and upcoming changelog entry use the required 🤖 marker. Added the public GitHub handle to
CONTRIBUTORS.mdwithout an email address.Validation:
Questions
DEVELOPMENT.md?CHANGELOG.md?CONTRIBUTORS.mdfile?