Open DamnWidget opened 9 years ago
Tulip is Python 3.3 compatible. The PyPI version of asyncio is 3.3 compatible.
Unfortunately I have no time to work on this at the moment
Ooh... I guess that's fine.
Well, I'm passively working (i.e. I'm thinking about it, not really writing code) on something for #202 and it seems to me that asyncio
is something that could be used there as well.
Please ping me if and when you work on this.
Tulip based event loops can't be implemented in ST3 as the ST3 interpreter is missing some C compiled modules.
from ..anaconda_lib import asyncio
File "/home/oscar/.config/sublime-text-3/Packages/anaconda/anaconda_lib/asyncio/__init__.py", line 21, in <module>
from .base_events import *
File "/home/oscar/.config/sublime-text-3/Packages/anaconda/anaconda_lib/asyncio/base_events.py", line 18, in <module>
import concurrent.futures
File "./concurrent/futures/__init__.py", line 17, in <module>
File "./concurrent/futures/process.py", line 52, in <module>
File "./multiprocessing/__init__.py", line 58, in <module>
ImportError: No module named '_multiprocessing
So very bad news guys.
Well, some good news? Package Control has a dependency for this..
This is a bit messy it will make anaconda non trivial to use asking the user to install a package dependency in order to just make his/her anaconda plugin just to work. I don't really like the idea, I will think about an elegant solution to solve this problem.
EDIT: Seems like ST3 should be able to autoload the dependency by himself but in my tests I couldn't achieve that result.
Well, Package Control has support for that. I'm currently using it in one of my fancy sublime-theme packages. (unpublished)
So, the user doesn't need to do that. It's done for them. As for testing, I don't know how you test.
Here's the link to the docs: https://packagecontrol.io/docs/dependencies
Tulip is a standard library implementation of the PEP-3156 that adds native (real) asynchronous support to Python 3.4. Sadly, the embedded interpreter into Sublime Text 3 is actually Python 3.3.3 and I don't think Jon is going to add support for Python 3.4 in the near future as no one but anaconda is using asynchronous sockets and event driven programming in order to speed up their plugins.
The anaconda ioloop implementation works like a charm in POSIX platform but doesn't works that well in Windows (probably because the lack of a native Windows maintainer developer in the project and lack of experience on networking programing in that platform), so update our humble (but effective) ioloop library into something more powerful (and developed by much more smart people than myself) should be nothing but a good thing to do, and hopefully it will fix all of our platform problems.
This is going to be tagged for release 2.0.0 that will add other improvements as compete support for run the plugin against remote JsonServers running in other machines or networks between other new improvements.