-
-
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
Tests with Python 3.11.0b1: RuntimeError: no running event loop / There is no current event loop in thread 'MainThread' #6757
Comments
Logs from pytest:
|
Hopefully someone will take a look at getting 3.11 working soon (the CI for 3.11 doesn't even get through the install step yet), as I'm not so familiar with these parts. But, you should probably be building from 3.8/3.9 branch, master (v4) is very unlikely to be deemed stable by the time of your next release. |
Same failures happen with the 3.8.1 release. I've just tested if it's still present on master. |
Fair enough, just wanted to be sure you weren't planning to ship that version. |
BTW The install step on the CI is likely to fail do to the 2 dependencies having pregenerated C sources with an old Cython version. If the cythinizing step happened on demand during install from sdist (with the newest stable Cython), it would probably work. At least that is what I had to workaround manually. |
Hello, Here, I'm a bit out of my depth (and also out of time this week). |
@encukou this looks like it might be because asyncio.run and AsyncTestCase (via asyncio.Runner) no longer calls asyncio.set_event_loop? |
@encukou this test only fails when run after
passing in isolation:
|
yep it's the missing calls to Lines 415 to 424 in 19d8c96
|
looks like this is still happening - it seems because the call to set_event_loop is deferred to |
Describe the bug
Hello, in Fedora, we build all Python packages with pre-releases of Python 3.11. With Python 3.11.0b1, we see test failures of aiohttp 3.8.1, I can reproduce them with the current master barnch.
To Reproduce
python3.11 -m venv venv
and. venv/bin/activate
make cythonize
with the recent cython version, thenpip install .
cython==0.29.27
withcython==0.29.30
or justcython
inrequirements/*
make cythonize
pip install . pytest pytest-mock
pytest tests/test_client_functional.py tests/test_client_request.py tests/test_loop.py tests/test_test_utils.py
as that is enough to get the failuresExpected behavior
Tests pass.
Logs/tracebacks
See the next comment, the log was too long to paste here.
Python Version
aiohttp Version
multidict Version
yarl Version
OS
Fedora Linux 35 or 37
Related component
Client
Additional context
We plan to update Fedora 37 to Python 3.11 after the second beta. Fedora 37 is the development version of Fedora.
While testing things, we need to do that in dependency order. Unfortunately, this blocks us from testing many other packages, as this is quite a popular library.
Code of Conduct
The text was updated successfully, but these errors were encountered: