Skip to content

Handle predicates without __name__ in waitForEvent timeouts - #1034

Open
kwy404 wants to merge 1 commit into
google:masterfrom
kwy404:fix-wait-for-event-predicate-name
Open

kwy404 wants to merge 1 commit into
google:masterfrom
kwy404:fix-wait-for-event-predicate-name

Conversation

@kwy404

@kwy404 kwy404 commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

When waitForEvent times out, it builds the error message from predicate.__name__. Callables such as functools.partial objects have no __name__, so instead of CallbackHandlerTimeoutError the caller got an AttributeError. This falls back to repr(predicate) in CallbackHandlerBase and the legacy CallbackHandler; the added test with a partial predicate fails before the change and passes after, and pyink is clean on the changed files.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant