Skip to content
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

Merged
merged 31 commits into from
Oct 16, 2015
Merged

Signals v2 #562

merged 31 commits into from
Oct 16, 2015

Conversation

asvetlov
Copy link
Member

@alexsdutton I've decided to drop signature check at all, at least for now.

Sends data to all registered receivers.
"""
for receiver in self:
res = receiver(**kwargs)
Copy link
Member

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.

Copy link
Member Author

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.

@asvetlov
Copy link
Member Author

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 aiohttp_toolbar for displaying:

  1. What signals was affected by HTTP request.
  2. What time these signals consume.

So web.Application from now has .debug property for raising debug-only signals.
And every regular signal should be constructed with mandatory app parameter (web.Application instance).

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

@asvetlov asvetlov mentioned this pull request Oct 12, 2015
@lock
Copy link

lock bot commented Oct 29, 2019

This thread has been automatically locked since there has not been
any recent activity after it was closed. Please open a new issue for
related bugs.

If you feel like there's important points made in this discussion,
please include those exceprts into that new issue.

@lock lock bot added the outdated label Oct 29, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants