Fix emitted() timeout handling on Python 3.10 - #6197
Open
evnchn wants to merge 3 commits into
Open
Conversation
DateInput applied .props('no-parent-event') to the inner QDate, but
Quasar 2.18.5's QDate has no such prop (noParentEvent belongs to the
anchor-props mixin behind QMenu/QTooltip). It was an inert no-op
attribute; removing it changes no behavior (open/close is driven by the
parent QMenu).
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
asyncio.wait_for raises asyncio.TimeoutError, which on CPython 3.10 is a separate class from the builtin TimeoutError (they only became identical in 3.11). The `except TimeoutError` clause therefore never caught the timeout on 3.10, so a bare asyncio.TimeoutError with no message and no exception chaining escaped instead of the intended descriptive TimeoutError. Catch asyncio.TimeoutError so the wrapper fires on all supported versions. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
6 tasks
falkoschindler
self-requested a review
July 26, 2026 20:37
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.
Motivation
On CPython 3.10,
await some_event.emitted(timeout=1.0)on an event that never fires raises the bare asyncio.TimeoutError with no message instead of the intended TimeoutError('Timed out waiting for event after 1.0 seconds'), so a caller doingexcept TimeoutError as e: print(e)sees an empty/opaque message and no exception chaining.Minimal reproduction (
nicegui/event.py:128) — the exact test/script that was run to reproduce it:→
Not run on this box. Verified the premise instead:Implementation
Changed event.py:128 except TimeoutError -> except asyncio.TimeoutError (3.10 asyncio.TimeoutError != builtin).
Verification
./nicegui· pylint 10.00/10 · pytest (touched) — all green.Progress