SublimeLinter/SublimeLinter — pull request #533 by kstrauser (2013-08-10 19:26:46+00:00)
Title: ST2/ST3 Reconciliation: print -> print()

OK, fellow intrepid explorers: we've got a situation on our hands. We have at least 3 major branches of SublimeLinter:

* origin/master, which is pretty great if you're using Sublime Text 2
* origin/sublime-text-3, which aims for ST3 compatibility but is missing a couple of pieces (the themes paths are wrong in ST3, quite a few print statements aren't functions yet, etc.)
* kstrauser/sublime-text-3, which actually works with ST3 but is off in the wilderness in its own repo

More branches == more hassle, amiright? We end up patching the same silly upstream bugs in 3 places and doing all kinds of massive merges to keep them all in sync.

Let's not do this anymore.

There's no underlying reason why we can't share a single codebase between ST2 and ST3 - and do it cleanly! At the very least, if we *have* to maintain separate branches (and I'm truly convinced that we don't, but *if* we do), then let's make them as tiny as possible.

To those ends, I've made the reconciliation_print_statements branch that doesn't do anything\* except convert every single print statement in the repo into a print() function call, in backward-compatible ways that generate identical output in both Python 2 and Python 3. After these patches, the diff between origin/master and the various sublime-text-3 branches are that much smaller and we're that much closer to having a single, unified codebase.

Oh, and there are going to be several of these pull requests to follow, such as for updating "except" statements to Python 2.7/3-compatible syntax. I'd bet most upstreams will be happy to have these, but I lack the drive to try to fix the whole world right now. I just want to fix the little part of it I'm living and working in. Kumbaya and all that.

TL;DR: Please merge this for great success and happiness.

\* OK, it fixes the pep8 "we're returning an int instead of an object" thing, too, but we can wink and keep it between friends.