[issue23140] InvalidStateError on asyncio subprocess task cancelled

2015-01-06 Thread Xavier de Gaye
Xavier de Gaye added the comment: > Thanks Xavier for the bug report, it should now be fixed. Works fine with me. Thanks for the patch. -- ___ Python tracker ___ ___

[issue23140] InvalidStateError on asyncio subprocess task cancelled

2015-01-05 Thread STINNER Victor
STINNER Victor added the comment: Thanks Xavier for the bug report, it should now be fixed. Sorry, I don't see any workaround right now (except of using the development version of Tulip). > The patch looks good, although the test feels overly complex (but maybe I'm > missing something). Oh,

[issue23140] InvalidStateError on asyncio subprocess task cancelled

2015-01-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset 990ce80d8283 by Victor Stinner in branch '3.4': Issue #23140, asyncio: Simplify the unit test https://hg.python.org/cpython/rev/990ce80d8283 -- ___ Python tracker

[issue23140] InvalidStateError on asyncio subprocess task cancelled

2015-01-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7c9b9d2514bb by Victor Stinner in branch '3.4': Issue #23140, asyncio: Fix cancellation of Process.wait(). Check the state of https://hg.python.org/cpython/rev/7c9b9d2514bb -- nosy: +python-dev ___ Python

[issue23140] InvalidStateError on asyncio subprocess task cancelled

2015-01-05 Thread STINNER Victor
STINNER Victor added the comment: > I'm okay with leaving the other unguarded set_result() call unchanged, but > I'm also okay with putting "if not self.waiter.cancelled():" around it. While playing with asyncio to try to inject errors on this code path, I found even more severe issues: see th

[issue23140] InvalidStateError on asyncio subprocess task cancelled

2015-01-05 Thread Guido van Rossum
Guido van Rossum added the comment: The patch looks good, although the test feels overly complex (but maybe I'm missing something). I'm okay with leaving the other unguarded set_result() call unchanged, but I'm also okay with putting "if not self.waiter.cancelled():" around it. -- __

[issue23140] InvalidStateError on asyncio subprocess task cancelled

2015-01-05 Thread STINNER Victor
STINNER Victor added the comment: Oh no. My comment was not published, it was probably an issue with my unstable Internet connection. Here is a patch fixing the issue with an unit test. There is another call to Future.set_result() in subprocess.py not protected by an if in connection_made().

[issue23140] InvalidStateError on asyncio subprocess task cancelled

2015-01-01 Thread Xavier de Gaye
Xavier de Gaye added the comment: The exception is not raised when loop.set_debug(False) on my linux box. So I guess this may be not reproductible on all platforms. The new attached test_cancel_2.py raises an exception while asyncio debug is false, by forcing one more iteration of the loop after

[issue23140] InvalidStateError on asyncio subprocess task cancelled

2014-12-31 Thread Xavier de Gaye
New submission from Xavier de Gaye: The attached test_cancel.py script prints the following error: Exception in callback SubprocessStreamProtocol.process_exited() handle: source_traceback: Object created at (most recent call last): File "test_cancel.py", line 37, in loop.run_until_comple