-
-
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
pytest-aiohttp freezes when using asyncio.create_subprocess_exec
in a process that reads from stdin
#3360
Comments
Git-bisecting with my reproducer points to commit 5853890 as the first bad commit. |
GitMate.io thinks the contributor most likely able to help you is @asvetlov. Possibly related issues are #1600 (aiohttp for long data processing), #2956 (Enable logging when aiohttp.web is used as a program), #2254 (when use aiodns), #2963 (aiohttp doesn't use system settings), and #2729 (400 milliseconds delay using aiohttp). |
I suspect that something is bad with adding child watcher here: https://github.com/aio-libs/aiohttp/blob/master/aiohttp/test_utils.py#L436-L441 |
Indeed, removing those lines fixes the problem. |
I believe the related code here has moved to pytest-asyncio, so if it's still an issue it likely needs to be reported against that project now. |
Long story short
pytest-aiohttp
freezes when usingasyncio.create_subprocess_exec
to create a process that reads from stdin using a pipe.Expected behaviour
The test suite does not hang when executing tests that use
asyncio.create_subprocess_exec
.Actual behaviour
The test suite using
pytest-aiohttp
hangs if two or more test useasyncio.create_subprocess_exec
reading from stdin.Steps to reproduce
Create a file called
test.py
with this codeand then run
python -m pytest test.py
. The interpreter hangs when running the second test.Your environment
Installed packages:
I was able to reproduce this issue in MacOs and Linux:
The text was updated successfully, but these errors were encountered: