[New-bugs-announce] [issue23140] InvalidStateError on asyncio subprocess task cancelled
Xavier de Gaye
report at bugs.python.org
Wed Dec 31 10:56:13 CET 2014
New submission from Xavier de Gaye:
The attached test_cancel.py script prints the following error:
Exception in callback SubprocessStreamProtocol.process_exited()
handle: <Handle SubprocessStreamProtocol.process_exited() created at Lib/asyncio/base_subprocess.py:130>
source_traceback: Object created at (most recent call last):
File "test_cancel.py", line 37, in <module>
loop.run_until_complete(main_task)
File "Lib/asyncio/base_events.py", line 286, in run_until_complete
self.run_forever()
File "Lib/asyncio/base_events.py", line 258, in run_forever
self._run_once()
File "Lib/asyncio/base_events.py", line 1102, in _run_once
handle._run()
File "Lib/asyncio/events.py", line 120, in _run
self._callback(*self._args)
File "Lib/asyncio/base_subprocess.py", line 146, in _process_exited
self._call(self._protocol.process_exited)
File "Lib/asyncio/base_subprocess.py", line 130, in _call
self._loop.call_soon(cb, *data)
Traceback (most recent call last):
File "Lib/asyncio/events.py", line 120, in _run
self._callback(*self._args)
File "Lib/asyncio/subprocess.py", line 99, in process_exited
waiter.set_result(returncode)
File "Lib/asyncio/futures.py", line 338, in set_result
raise InvalidStateError('{}: {!r}'.format(self._state, self))
asyncio.futures.InvalidStateError: CANCELLED: <Future cancelled created at Lib/asyncio/subprocess.py:126>
----------
components: asyncio
files: test_cancel.py
messages: 233237
nosy: giampaolo.rodola, gvanrossum, haypo, pitrou, xdegaye, yselivanov
priority: normal
severity: normal
status: open
title: InvalidStateError on asyncio subprocess task cancelled
type: behavior
versions: Python 3.5
Added file: http://bugs.python.org/file37571/test_cancel.py
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23140>
_______________________________________
More information about the New-bugs-announce
mailing list