Closed Joshuaalbert closed 3 weeks ago
Happens every few test runs, I've not been able to figure it out.
However, I just had another look and saw something very suspicious: https://github.com/aio-libs/aiohttp/blob/master/tests/test_web_sendfile_functional.py#L44
If I'm reading that correctly, the code changes the event loop in the middle of handling a request, which seems crazy. Maybe you can have a look and see if that code can be changed to not set the event loop in the middle of a running application?
Another: https://github.com/aio-libs/aiohttp/actions/runs/4095635910/jobs/7172398166
@Joshuaalbert You said you have the same issue in your code. Is that in tests or when running the application, and are you using run_app()
to run the application?
Just found this issue: https://github.com/python/cpython/issues/74269 Suggests the cause may be due to running a loop differently. In which case the test failures we see are likely due to pytest-asyncio or similar.
I also note that an event loop gets closed at: https://github.com/pytest-dev/pytest-asyncio/blob/master/pytest_asyncio/plugin.py#L398 So, I think that may be related.
Same issue, NixOS, armv7l-linux, Python 3.10.10: https://hydra.armv7l.xyz/build/4977/nixlog/43
same issue, openSUSE Tumbleweed, s390x, Python 3.11
I've not seen this in the CI for some time. Anybody still reproducing this?
Describe the bug
I noticed a unittest failing.
https://github.com/aio-libs/aiohttp/actions/runs/4131520742/jobs/7139246584#step:10:474
We're finding similar bugs in our code that just popped up, and wonder if you have any idea what is causing it.
To Reproduce
Run the unittest at this line: https://github.com/aio-libs/aiohttp/actions/runs/4131520742/jobs/7139246584#step:10:474
Expected behavior
It should pass
Logs/tracebacks
Python Version
aiohttp Version
multidict Version
yarl Version
OS
Ubunutu
Related component
Client
Additional context
No response
Code of Conduct