Conversation
67c4795 to
66d35be
Compare
Codecov Report
@@ Coverage Diff @@
## 2.2 #2059 +/- ##
=======================================
Coverage 97.03% 97.03%
=======================================
Files 38 38
Lines 7683 7683
Branches 1341 1341
=======================================
Hits 7455 7455
Misses 104 104
Partials 124 124
Continue to review full report at Codecov.
|
|
No. We intentionally disabled default event loop to check for passing the loop explicitly everywhere in aiohttp. But your problem has another solution: just call |
|
@asvetlov ah thanks! Makes totally sense. Then would it be a good idea to add this call in the setup_test_loop? Because apparently I'm not the only one to have failed to understand. |
|
Actually that won't work. |
|
Ooops, I see. |
|
I found a way ^_^ |
cf24a08 to
e869be2
Compare
|
Actually I'm not entirely sure that you want to enforce the developers to give the event loop explicitly. According to my memory of the doc of asyncio, this is highly "recommended". But enforcing it will only break all the applications that rely on that behavior. For once, I'm the one who suggest to be flexible on that. |
The fact that on Unix system we don't create automatically a child watcher makes all call to asyncio.create_subprocess_* to fail.
e869be2 to
3398a09
Compare
|
I close this PR and re-open it for master because it will now be a feature and not a fix. |
What do these changes do?
Set the current event loop properly during the test.
Are there changes in behavior for the user?
Some functions that use the default event loop will now work properly: asyncio.create_subprocess_exec and asyncio.create_subprocess_shell
Related issue number
#2058
Checklist
CONTRIBUTORS.txtchangesfolder<issue_id>.<type>for example (588.bug)issue_idchange it to the pr id after creating the pr.feature: Signifying a new feature..bugfix: Signifying a bug fix..doc: Signifying a documentation improvement..removal: Signifying a deprecation or removal of public API..misc: A ticket has been closed, but it is not of interest to users.