Support Python 2.7 in Sublime Text 3

Glyf 5 years ago 0

There are many reasons to stick with a version of Python 2.x.

  • All existing Sublime Text plugins are on Python 2.6; Sublime Text 3 has a different API as well as a different language version.  The recommended policy for 2.x->3.x Python upgrades is to allow for the language upgrade to be made independently of the API upgrade.  This is especially important for proprietary systems that have plugins like Sublime, since most plugins don't have a continuous integration systems (Sublime is hard to automate server-side) and are more likely to have bugs that don't get spotted when doing these big upgrades.
  • Many useful Python libraries (such as Django, Twisted, Flask, South, Paramiko, html5lib, python-ldap, Selenium, Pylons, and so on) only support Python 2.x, and it is super helpful when developing with these libraries to be able to import them directly within Sublime plugins; this is one of the reasons that I personally switched to Sublime.  At least one plugin (SubliminalCollaborator) uses portions of Twisted that haven't been ported yet, and that dependency will take a non-trivial amount of time to upgrade, even if the plugin itself requires no effort.
  • PyPy, a radically faster runtime for Python, still only works with 2.x, so many of these libraries need to maintain Python 2 support for the time being anyway, but Python 3 support has fewer obvious benefits, so they invest less energy in it.
  • Specifically regarding 2.7: jumping from Python 2.6 to 3.x is a big jump; moving from 2.7 to 3.x is a slightly more manageable leap.  If you can't do a version of Sublime Text 3 that supports 2.7, perhaps you could at least do a version of Sublime Text 2 that upgrades from 2.6 to 2.7.

Since plugins in Sublime Text 3 already live in a separate process, perhaps there could be a Python 2.7 plugin process and a Python 3.x plugin process as well, to allow plugins to transition gradually, rather than all at once.

Please consider restoring Python 2.x support to the new version of Sublime Text.