Add missing await in AioHttpIntegration.#261
Conversation
|
I admit I don't understand the async story in Python. I assumed directly returning a coroutine in an async function would be equivalent. Could you write a test for this? You should be able to do this: and copy the rest from an existing test. |
Codecov Report
@@ Coverage Diff @@
## master #261 +/- ##
==========================================
- Coverage 81.74% 81.01% -0.73%
==========================================
Files 32 32
Lines 2750 2750
Branches 444 444
==========================================
- Hits 2248 2228 -20
- Misses 340 362 +22
+ Partials 162 160 -2
Continue to review full report at Codecov.
|
|
The problem is, that if you call a Coroutine (something with I'll check the test situation. |
|
nvm, yes, brainfart. I think I was too much in Rust's async support where using a |
|
Btw, urllib3 and certifi seems to be missing in the test requirements |
|
I assume you did this:
while I usually do this in addition:
|
|
try this: There are a lot of "optional test requirements" because some things don't work in certain python versions. |
This demonstrates the behaviour in getsentry#260. Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>
The replaced _handle method of aiohttp.web.Application is a coroutine itself. So it has to await the call to the original handle otherwise its never awaited. This fixes getsentry#260 Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>
e100d1f to
268c7bb
Compare
|
There is now a unittest that fails without the fix and works with it :) |
|
Awesome, thanks! |
The replaced _handle method of aiohttp.web.Application is a coroutine
itself. So it has to await the call to the original handle otherwise its
never awaited.
This fixes #260
Signed-off-by: Jan Losinski losinski@wh2.tu-dresden.de