Test failing on Python 3.10
fabaff opened this issue · comments
Some tests are failing with Python 3.10 while they are passing with Python 3.9 due to a DeprecationWarning
.
============================= test session starts ==============================
platform linux -- Python 3.10.1, pytest-6.2.5, py-1.11.0, pluggy-1.0.0
rootdir: /build/trio_asyncio-0.12.0, configfile: setup.cfg
plugins: trio-0.7.0
collected 102 items
tests/test_aio_subprocess.py FFFFFFFFFFFF.. [ 13%]
tests/test_concurrent.py ... [ 16%]
tests/test_deprecate.py ........... [ 27%]
tests/test_misc.py ................. [ 44%]
tests/test_sync.py . [ 45%]
tests/test_trio_asyncio.py .... [ 49%]
tests/aiotest/test_add_reader.py ... [ 51%]
tests/aiotest/test_callback.py ... [ 54%]
tests/aiotest/test_coroutine.py FF [ 56%]
tests/aiotest/test_network.py . [ 57%]
tests/aiotest/test_thread.py .... [ 61%]
tests/aiotest/test_timer.py .. [ 63%]
tests/interop/test_adapter.py .....FF.....F.... [ 80%]
tests/interop/test_calls.py ..........FF...FFFFF [100%]
=================================== FAILURES ===================================
_____________________________ test_subprocess_exec _____________________________
value = <trio.Nursery object at 0x7ffff5dfcb80>
async def yield_(value=None):
> return await _yield_(value)
/nix/store/03mxwpmhmcaa3bkkjnlkabahnp3m32kk-python3.10-async_generator-1.10/lib/python3.10/site-packages/async_generator/_impl.py:106:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/nix/store/03mxwpmhmcaa3bkkjnlkabahnp3m32kk-python3.10-async_generator-1.10/lib/python3.10/site-packages/async_generator/_impl.py:99: in _yield_
return (yield _wrap(value))
tests/test_aio_subprocess.py:76: in test_subprocess_exec
await run_subprocess_exec(loop)
trio_asyncio/_adapter.py:54: in __call__
return await self.loop.run_aio_coroutine(f)
trio_asyncio/_base.py:216: in run_aio_coroutine
return await run_aio_future(fut)
trio_asyncio/_util.py:44: in run_aio_future
res = await trio.lowlevel.wait_task_rescheduled(abort_cb)
/nix/store/s2xb9x540cdy6cx7bhdwgzymw10q0cm8-python3.10-trio-0.19.0/lib/python3.10/site-packages/trio/_core/_traps.py:166: in wait_task_rescheduled
return (await _async_yield(WaitTaskRescheduled(abort_func))).unwrap()
/nix/store/j5rwbdb38ab24z53k9y9861ncxd20nvh-python3.10-outcome-1.1.0/lib/python3.10/site-packages/outcome/_impl.py:138: in unwrap
raise captured_error
trio_asyncio/_adapter.py:17: in _call_defer
return await proc(*args, **kwargs)
tests/test_aio_subprocess.py:86: in run_subprocess_exec
transp, proto = await connect
/nix/store/fi0f5rz33byvsqlzs5hcc6l25scdlg42-python3-3.10.1/lib/python3.10/asyncio/base_events.py:1645: in subprocess_exec
protocol = protocol_factory()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <tests.test_aio_subprocess.MySubprocessProtocol object at 0x7ffff5dfc460>
loop = <TrioEventLoop running=closed at 0x7ffff5dfc6a0>
def __init__(self, loop):
self.state = 'INITIAL'
self.transport = None
> self.connected = asyncio.Future()
E DeprecationWarning: There is no current event loop
tests/test_aio_subprocess.py:23: DeprecationWarning
_________________________ test_subprocess_interactive __________________________
value = <trio.Nursery object at 0x7ffff6f4cf70>
async def yield_(value=None):
> return await _yield_(value)
/nix/store/03mxwpmhmcaa3bkkjnlkabahnp3m32kk-python3.10-async_generator-1.10/lib/python3.10/site-packages/async_generator/_impl.py:106:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/nix/store/03mxwpmhmcaa3bkkjnlkabahnp3m32kk-python3.10-async_generator-1.10/lib/python3.10/site-packages/async_generator/_impl.py:99: in _yield_
return (yield _wrap(value))
tests/test_aio_subprocess.py:103: in test_subprocess_interactive
await run_subprocess_interactive(loop)
trio_asyncio/_adapter.py:54: in __call__
return await self.loop.run_aio_coroutine(f)
trio_asyncio/_base.py:216: in run_aio_coroutine
return await run_aio_future(fut)
trio_asyncio/_util.py:44: in run_aio_future
res = await trio.lowlevel.wait_task_rescheduled(abort_cb)
/nix/store/s2xb9x540cdy6cx7bhdwgzymw10q0cm8-python3.10-trio-0.19.0/lib/python3.10/site-packages/trio/_core/_traps.py:166: in wait_task_rescheduled
return (await _async_yield(WaitTaskRescheduled(abort_func))).unwrap()
/nix/store/j5rwbdb38ab24z53k9y9861ncxd20nvh-python3.10-outcome-1.1.0/lib/python3.10/site-packages/outcome/_impl.py:138: in unwrap
raise captured_error
trio_asyncio/_adapter.py:17: in _call_defer
return await proc(*args, **kwargs)
tests/test_aio_subprocess.py:113: in run_subprocess_interactive
transp, proto = await connect
/nix/store/fi0f5rz33byvsqlzs5hcc6l25scdlg42-python3-3.10.1/lib/python3.10/asyncio/base_events.py:1645: in subprocess_exec
protocol = protocol_factory()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <tests.test_aio_subprocess.MySubprocessProtocol object at 0x7ffff6f4ce80>
loop = <TrioEventLoop running=closed at 0x7ffff60386a0>
def __init__(self, loop):
self.state = 'INITIAL'
self.transport = None
> self.connected = asyncio.Future()
E DeprecationWarning: There is no current event loop
tests/test_aio_subprocess.py:23: DeprecationWarning
____________________________ test_subprocess_shell _____________________________
[...]
Should be fixed in a13014d