> On Oct 6, 2014, at 4:24 PM, Victor Stinner <[email protected]> wrote: > > Hi, > > 2014-10-06 13:11 GMT+02:00 Donald Stufft <[email protected]>: >> My problem with _overlapped is mostly that it required a compiler. I’m idly >> considering what it’d take to give pip some concurrency and one of the >> requirements there is that we can’t depend on anything that isn’t in the >> standard library of 2.6, 2.7, 3.2+ or can’t be bundled inside of pip and is >> pure Python. Most likely this will end up being threads but I really don’t >> like threads much and It occurred to me it may be possible to bundle >> Trollius. > > Oh. Embedding asyncio in pip is an a simple task :-) asyncio a lot of > dependencies. Well, you want Python 2.6+ support, so it's simpler to > say Trollius. Trollius depends on futures and orderreddict on Python > 2.6: > http://trollius.readthedocs.org/install.html#dependencies > > More recent Python versions have less dependencies. I backported other > modules in Trollius for Python 2.6+: > http://trollius.readthedocs.org/install.html#backports > > Only _overlapped in written in C. _overlapped.c is large: 1430 lines > of C code. It will be hard to reimplement it using cffi or ctypes > (note: cffi has also its own dependencies...), and I'm not interested > to work on such new implementation, nor to maintain it. It's already > hard to maintain: Tulip (Python 3.3), asyncio in Python 3.4, asyncio > in Python 3.5 and Trollius. > > If you only need sockets, the SelectorEventLoop (select) is enough on > Windows. If you need more features (ex: subprocesses), you can threads > using run_in_executor(): > https://docs.python.org/dev/library/asyncio-eventloop.html#executor > > Which kind of features do you want to run asynchronously?
Primarily network access. To be clear, the current stage this is in is “is it even possible to do this” before I sort out if it’s a good idea, what it would look like, and what the costs would be. It appears it’s at least possible so now I need to sort out if it’s a good idea or not :) --- Donald Stufft PGP: 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA
