-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Signals v2 #562
Signals v2 #562
Conversation
…nto alexsdutton-signals-v2
Sends data to all registered receivers. | ||
""" | ||
for receiver in self: | ||
res = receiver(**kwargs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to ensure that all the receivers in Signal are callable? Otherwise it won't be cool to get some TypeError: 'int' object is not callable
from the deepest aiohttp internals without any pointers about what the signal that was and where it came from.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initial version from @alexsdutton had signature check. But I quite unhappy with it.
I prefer adding good checker later but keeping no checks at all in first implementation.
Also I have strong feeling we need two special signals for every signal call: first before the call and second after signal processing finished. Those debug signals are extremely useful for tools like
So The current PR is final from my perspective, I'll push it into master if no objections will appear until Friday. After that I'd like to publish next 0.18 release |
Conflicts: tests/conftest.py
@alexsdutton I've decided to drop signature check at all, at least for now.