Switch to Python 3
This PR switches everything to the Python 3 syntax.
The protocol should be backward compatible with Python 2 versions of CoVim. Haven't tested.
Is anyone willing to test this with python 2? It would be good to know for sure before merging.
There are so many py3 specific references, this can't possibly work without py3 (e.g. invoking vimscript py3 calls system python3 only, correct?)... that said, I don't know of a modern distro without py3 installed where people would be wanting to share terminal/vim sessions :)
That was the major reason behind completely dropping Python 2 support. Ubuntu/Debian repositories default to a version of Vim without Python 2 compiled.
But then again, if someone can come up with a minimal backwards-compatible way to do this, that'd be great.
My debian jessie vim-tiny has neither python nor python3 support. The next (very anecdotally) most common vim package, vim-nox, supports only python 2. The others have many gui library dependencies (gnome, gtk, athena). Which version of debian did you test with?
I believe this would break a typical debian jessie install :(. It looks like a lot of this can be conditional though, adding flexible support for either in vim.command(...) or in a conditional in the .vim script.
This may fix more users than it breaks, so maybe merge and add support later. Just figured I'd bring it up :)
@narfman0 Whoops, I meant Ubuntu's vim-nox package compiles only Python 3 support. Ubuntu (and Debian repositories don't have both compiled in at the same time, so using Python 3-only bundles would require breaking CoVim.
I don't know of a modern distro without py3
Not everybody has a "modern" distro. RHEL-7/Debian-stable … specifically distros used by people who need computer for their work. I think better way is to use do dual-mode code, which works both with py2k and py3k.
Any chance of this being merged or do I continue using the non-standard branch?