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
test_coroutines fails with --without-threads #69554
Comments
test.test_coroutines.CoroAsyncIOCompatTest.test_asyncio_1() fails with --without-threads, because it imports asyncio module, which is known to not work with --without-threads. ====================================================================== Traceback (most recent call last):
File "/tmp/cpython/Lib/test/test_coroutines.py", line 1325, in test_asyncio_1
import asyncio
File "/tmp/cpython/Lib/asyncio/__init__.py", line 21, in <module>
from .base_events import *
File "/tmp/cpython/Lib/asyncio/base_events.py", line 18, in <module>
import concurrent.futures
File "/tmp/cpython/Lib/concurrent/futures/__init__.py", line 8, in <module>
from concurrent.futures._base import (FIRST_COMPLETED,
File "/tmp/cpython/Lib/concurrent/futures/_base.py", line 8, in <module>
import threading
File "/tmp/cpython/Lib/threading.py", line 4, in <module>
import _thread
ImportError: No module named '_thread' |
Can you test with this patch? |
It works. |
You also can use special helper: test.support.import_module(). |
Can one of you produce a proper patch? Then the other can review. Serhiy can commit it. |
New changeset d8737b841fcf by Victor Stinner in branch '3.5': New changeset d8002372e5df by Victor Stinner in branch 'default': |
I fixed the issue based on Guido's patch and Serhiy's suggestion. |
====================================================================== Traceback (most recent call last):
File "/tmp/cpython/Lib/test/test_coroutines.py", line 1351, in test_asyncio_1
loop = asyncio.new_event_loop()
NameError: name 'asyncio' is not defined |
New changeset 493845d905c5 by Victor Stinner in branch '3.5': |
Oops :-( I also fixed this one, sorry. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: