Hi, I created a new Trollius project, port of the Tulip project on Python 2.7: https://bitbucket.org/haypo/trollius/
Trollius is very close to my previous "tulip_py2" project which was more a proof of concept, but the code is a little bit cleaner. The Mercurial repository is now a clone of Tulip repository, all changes are in a new "trollius" branch. In my opinion, changes should first be made in CPython, then reported to Tulip and finally to Trollius (CPython asyncio => Tulip => Trollius). I may be possible to modify first Tulip (Tulip => CPython and Tulip => Trollius), but it requires to compare more carefully changes (ex: using meld tool). Some Trollius unit tests are still failing, and I didn't touch examples yet (examples don't work). Differences between Trollius and Tulip: * Python 2 has no keyword-only parameters * Trollius coroutines use yield whereas Tulip coroutines must use yield-from * Trollius coroutines must use "raise Return(value)", whereas Tulip simply uses "return value" thanks to Python 3.3 improvements * If the concurrent.futures module is missing, BaseEventLoop.run_in_executor() raises NotImplementedError and asyncio.wrap_future() is not available See commits to see all differences between Trollius and Tulip: https://bitbucket.org/haypo/trollius/commits/all Changes between tulip_v2 and Trollius: - Trollius repository is a clone of Tulip repository, so it will be easier to update it (it is possible to use "hg merge") - Trollius has an implementation of time.monotonic() working on Windows, Mac OS X, Linux, FreeBSD, OpenBSD, Solaris - test_support.py is now in asyncio/ directory - no more concurrent.futures backport: I copied concurrent.futures classes and constants to not depend on it. I plan to reuse the existing concurrent.futures backport for EventLoop.run_in_executor() (which currently raises a NotImplementError if the module is missing). - selectors.SelectSelector also uses wrap_error() to get an InterruptedError Victor
