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
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
654a806
Initial signal implementation. Tests and documentation to follow.
alexdutton Jul 9, 2015
ac75361
Wrap iscoroutinefunction check in 'if __debug__', so people can optim…
alexdutton Jul 20, 2015
fefd2ed
Rename AsyncSignal to CoroutineSignal for clarity of purpose
alexdutton Jul 20, 2015
d45ff67
Add base class for signals
alexdutton Jul 20, 2015
cf29660
Add signal tests
alexdutton Jul 20, 2015
98c418a
Documentation!
alexdutton Jul 21, 2015
4d8b509
Point at FunctionSignal, not Signal in `on_response_start` docs
alexdutton Jul 21, 2015
9bedbbb
Merge remote-tracking branch 'upstream/master' into signals-v2
alexdutton Sep 25, 2015
f04fbb3
Remove FunctionSignals in light of #525.
alexdutton Sep 25, 2015
5fb868b
Move on_response_start firing to `prepare()` and treat it as a coroutine
alexdutton Sep 25, 2015
cc2efbd
Raise TypeError on non-coroutine functions, to match signature mismat…
alexdutton Sep 25, 2015
9170057
Working tests again.
alexdutton Sep 25, 2015
5825da3
Signal now based on list; still does signature checking
alexdutton Sep 28, 2015
dea0a1e
Merge remote-tracking branch 'upstream/master' into signals-v2
alexdutton Sep 28, 2015
f5b98ac
Drop requirement for signal receivers to be coroutines (but they stil…
alexdutton Sep 28, 2015
322f650
Fix variable name in signature check call
alexdutton Sep 28, 2015
a0f10f7
Merge branch 'signals-v2' of https://github.com/alexsdutton/aiohttp i…
asvetlov Oct 11, 2015
dbc8393
Drop signal signature check
asvetlov Oct 11, 2015
b037e2b
Add more tests
asvetlov Oct 11, 2015
15d815e
Allow using positional args to Signal.send
asvetlov Oct 11, 2015
74413d4
Fix failed test
asvetlov Oct 11, 2015
67414c8
Update docs
asvetlov Oct 11, 2015
02c44a4
Merge branch 'master' into signals-v2
asvetlov Oct 12, 2015
6cd8a44
Convert signal tests to pytest usage
asvetlov Oct 12, 2015
1a9c0a7
Fix tests
asvetlov Oct 13, 2015
0089a65
Properly mock coroutine
asvetlov Oct 13, 2015
053d184
Fix signals test
asvetlov Oct 13, 2015
73ad8fb
Merge branch 'master' into signals-v2
asvetlov Oct 13, 2015
602b19c
Merge branch 'master' into signals-v2
asvetlov Oct 14, 2015
9939f94
Fix failed test
asvetlov Oct 14, 2015
0c32f47
Fix next test
asvetlov Oct 14, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix next test
asvetlov committed Oct 14, 2015
commit 0c32f470ef1722e7aa171a1c3ba137dab99ba2c1
6 changes: 5 additions & 1 deletion tests/test_signals.py
Original file line number Diff line number Diff line change
@@ -84,7 +84,11 @@ def callback(*args, **kwargs):
def test_response_prepare(loop, app):
callback = mock.Mock()

app.on_response_prepare.append(asyncio.coroutine(callback))
@asyncio.coroutine
def cb(*args, **kwargs):
callback(*args, **kwargs)

app.on_response_prepare.append(cb)

request = make_request(app, 'GET', '/')
response = Response(body=b'')