You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Event(..., delay=..., internal=True) error shows the placeholder id instead of the attribute name #679
Found during the adversarial review of the 3.2.2 release notes.
Declaring go = Event(a.to(b), delay=50, internal=True) correctly raises InvalidDefinition (#668), but the message names the placeholder id: Event __event__<uuid> cannot be both delayed and internal. Event.__new__ runs the check before the class attribute name is known; only an explicit id= shows a useful name. The doctest in the notes hides it with IGNORE_EXCEPTION_DETAIL.
Expected: the error names the event (go), e.g. by deferring the check until the metaclass binds the attribute name.
Related minor: send("go", delay=0) cannot override a declared delay, because 0 is treated as "not given" (falsy check). An explicit delay=0 should win, the same way an explicit internal=False does.
Activity
fix: name the event in the delayed+internal error and let send(delay=…