[issue28544] Implement asyncio.Task in C

2016-10-31 Thread Brett Cannon
Brett Cannon added the comment: Just an FYI, for testing code that has both pure Python and C versions you can follow the advice in https://www.python.org/dev/peps/pep-0399/#details . And if you want to really simplify things you start down the road of what test_importlib uses: https://github

[issue28544] Implement asyncio.Task in C

2016-10-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset 950fbd75223b by Victor Stinner in branch '3.6': Issue #28544: Fix inefficient call to _PyObject_CallMethodId() https://hg.python.org/cpython/rev/950fbd75223b -- ___ Python tracker

[issue28544] Implement asyncio.Task in C

2016-10-28 Thread Yury Selivanov
Yury Selivanov added the comment: Looks like that Windows buildbot is green now. Closing. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ _

[issue28544] Implement asyncio.Task in C

2016-10-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset db7bcd92cf85 by Yury Selivanov in branch '3.6': Issue #28544: Pass `PyObject*` to _PyDict_Pop, not `PyDictObject*` https://hg.python.org/cpython/rev/db7bcd92cf85 New changeset 60b6e820abe5 by Yury Selivanov in branch 'default': Merge 3.6 (issue #285

[issue28544] Implement asyncio.Task in C

2016-10-28 Thread Yury Selivanov
Yury Selivanov added the comment: > Python 3.6 & default don't compile on Windows because of the change: Pushed a fix for that. -- ___ Python tracker ___ ___

[issue28544] Implement asyncio.Task in C

2016-10-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset 635f5854cb3e by Yury Selivanov in branch '3.6': Issue #28544: Fix compilation of _asynciomodule.c on Windows https://hg.python.org/cpython/rev/635f5854cb3e New changeset 9d95510dc203 by Yury Selivanov in branch 'default': Merge 3.6 (issue #28544) ht

[issue28544] Implement asyncio.Task in C

2016-10-28 Thread STINNER Victor
STINNER Victor added the comment: Python 3.6 & default don't compile on Windows because of the change: http://buildbot.python.org/all/builders/AMD64%20Windows8%203.x/builds/2795/steps/compile/logs/stdio "D:\buildarea\3.x.bolen-windows8\build\PCbuild\_asyncio.vcxproj" (Build target) (15)

[issue28544] Implement asyncio.Task in C

2016-10-28 Thread Yury Selivanov
Yury Selivanov added the comment: > Can you please do it Yury? Yes, Elvis and I will be the editors of What's New this year anyways ;) -- ___ Python tracker ___

[issue28544] Implement asyncio.Task in C

2016-10-28 Thread STINNER Victor
STINNER Victor added the comment: Since asyncio becomes popular, IMO it is worth to mention this optimization at: https://docs.python.org/dev/whatsnew/3.6.html#optimizations Can you please do it Yury? -- ___ Python tracker

[issue28544] Implement asyncio.Task in C

2016-10-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset fb7c439103b9 by Victor Stinner in branch '3.6': Issue #28544: Fix _asynciomodule.c on Windows https://hg.python.org/cpython/rev/fb7c439103b9 -- ___ Python tracker

[issue28544] Implement asyncio.Task in C

2016-10-28 Thread Yury Selivanov
Yury Selivanov added the comment: I've committed the patch with a few touchups: * Applied code-review feedback. * We now use AC for all methods, including Task._repr_info, Task._step, etc. See [1]. * I fixed the Task to be fully subclassable; users can override Task._step and Task._wakeup no

[issue28544] Implement asyncio.Task in C

2016-10-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset db5ae4f6df8a by Yury Selivanov in branch '3.6': Issue #28544: Implement asyncio.Task in C. https://hg.python.org/cpython/rev/db5ae4f6df8a New changeset 8059289b55c1 by Yury Selivanov in branch 'default': Merge 3.6 (issue #28544) https://hg.python.or

[issue28544] Implement asyncio.Task in C

2016-10-27 Thread Yury Selivanov
Yury Selivanov added the comment: > - and `tasks.py` imports `futures.py` to have `isfuture`. And tasks.py also imports coroutines.py (which was importing futures.py), making the cycle even worse. Anyways, I don't see a problem in moving a function or two that everybody uses into a separate m

[issue28544] Implement asyncio.Task in C

2016-10-27 Thread Yury Selivanov
Yury Selivanov added the comment: > Why isfuture() is moved, and asyncio.coroutine uses > base_futures.isfuture() instead of futures.isfuture()? Import cycles: - `_asyncio` module is now being imported from `futures.py` - and `_asyncio` is now imported from `tasks.py`; - and `tasks.py` import

[issue28544] Implement asyncio.Task in C

2016-10-27 Thread INADA Naoki
INADA Naoki added the comment: Why isfuture() is moved, and asyncio.coroutine uses base_futures.isfuture() instead of futures.isfuture()? -- ___ Python tracker ___ __

[issue28544] Implement asyncio.Task in C

2016-10-27 Thread Yury Selivanov
Yury Selivanov added the comment: Uploading a new patch: sorted imports; added a unittest that exceptions in loop.call_soon aren't breaking Task.__init__. -- Added file: http://bugs.python.org/file45248/ctask3.patch ___ Python tracker

[issue28544] Implement asyncio.Task in C

2016-10-27 Thread Yury Selivanov
Yury Selivanov added the comment: Guido, Ned, thanks! Andrew already glanced through the code, let's see what Inada-san says. I'm uploading an updated patch addressing Andrew's review. -- Added file: http://bugs.python.org/file45245/ctask2.patch __

[issue28544] Implement asyncio.Task in C

2016-10-27 Thread Ned Deily
Ned Deily added the comment: I also trust Yury to do the right thing. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue28544] Implement asyncio.Task in C

2016-10-27 Thread Guido van Rossum
Guido van Rossum added the comment: I don't want to be the decider here. I don't have time to review the code. I trust you all to do the right thing. -- ___ Python tracker ___ __

[issue28544] Implement asyncio.Task in C

2016-10-27 Thread Andrew Svetlov
Andrew Svetlov added the comment: Very impressive. I've left a couple comments in rietveld though. -- ___ Python tracker ___ ___ Pytho

[issue28544] Implement asyncio.Task in C

2016-10-27 Thread Ned Deily
Ned Deily added the comment: If it's OK with Guido, it's OK with me for 360b3. (That's Monday.) -- ___ Python tracker ___ ___ Python-b

[issue28544] Implement asyncio.Task in C

2016-10-27 Thread Yury Selivanov
Yury Selivanov added the comment: > Yury, would you like to merge this before 3.6b3? Yes! > I'll look this as soon as possible. Thanks a lot! -- ___ Python tracker ___ ___

[issue28544] Implement asyncio.Task in C

2016-10-27 Thread INADA Naoki
INADA Naoki added the comment: Wow! Great Job! Yury, would you like to merge this before 3.6b3? I'll look this as soon as possible. (nit fix) Some modules doesn't sort imports in lexicography. -- ___ Python tracker

[issue28544] Implement asyncio.Task in C

2016-10-27 Thread Yury Selivanov
Yury Selivanov added the comment: Also, with this patch uvloop becomes ~3-5% faster too. -- ___ Python tracker ___ ___ Python-bugs-lis

[issue28544] Implement asyncio.Task in C

2016-10-27 Thread Elvis Pranskevichus
Changes by Elvis Pranskevichus : -- nosy: +Elvis.Pranskevichus ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue28544] Implement asyncio.Task in C

2016-10-27 Thread Yury Selivanov
New submission from Yury Selivanov: The attached patch implements asyncio.Task in C. Besides that, it also implements Argument Clinic for C Future. Performance improvement on a simple echo server implementation using asyncio.streams: Python Future & Task | C Future & Py Task | C Futu