Repository: pre-commit/pre-commit

Issue:
Drop python2.6?
Is it worth attempting to continue to support python2.6?



Discussion:
Is it a lot of work to keep 2.6 considering we're doing 2.7? We still have a lot of projects at Yelp on 2.6, I imagine other companies/projects still need to support it too.

There's no reason pre-commit itself needs to run on Python 2.6, right? It's the hooks itself that maybe need to support older code (e.g. if they parse the Python AST).

It's sometimes convenient to install into the same virtualenv, but it's straightforward to use tox with a different Python version.

Yeah but it's slightly awkward if you're not a python shop/project and you're stuck on lucid / old debian / old osx / old etc. hmmmmm

To be fair, lucid is unsupported, squeeze is only supported until February (last Debian release with 2.6), and I'm pretty sure OS X has basically no support period :p

But yeah, point taken.

My 2 cents, support 2.6 until a test fails on that release.  At that point, kill it.  Anybody using Python 2.6 for active development is in a bad way.  We can all concede that there are Python 2.6 codebases still living, but they're not being actively developed - and the only purpose of this tool is to support active development.

@adamn: it seems you assume there that the only way in which Python 2.6 becomes a burden for `pre-commit` is when tests break on it. In addition to untested failure modes that aren't caught that way, being Python 2.6 compatible also has an impact on the code and tooling (e.g., `pip` availability) itself in the first place. Breaking loose from Python 2.6 could be an advantage. So, I would say we should take a broader perspective on the ups and downs of keeping Python 2.6 compat.

I would like to add to your point about living code bases, that projects can just keep using older versions of pre-commit that are compatible. I.e., support for platforms for legacy reasons shouldn't really be an argument here. Only if Python 2.6-based projects were still expecting to use new features in precommit this would be an issue, but as you wrote, it is a dead platform.

@sanmai-NL Funny, I was trying to be diplomatic about dropping Python 2.6 in order to gently nudge people towards that.  I'm a huge fan of just dropping it now though - that would be great!

Our tests are now failing due to flake8 dropping python2.6.  I believe this is enough reason to drop python2.6 support.

0.8.x will be the last versions that support python2.6, starting in 0.9.0 python2.7+ will only be supported


Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -18,7 +18,6 @@
     classifiers=[
         'License :: OSI Approved :: MIT License',
         'Programming Language :: Python :: 2',
-        'Programming Language :: Python :: 2.6',
         'Programming Language :: Python :: 2.7',
         'Programming Language :: Python :: 3',
         'Programming Language :: Python :: 3.4',
@@ -46,9 +45,6 @@
         'pyyaml',
         'virtualenv',
     ],
-    extras_require={
-        ':python_version=="2.6"': ['argparse', 'ordereddict'],
-    },
     entry_points={
         'console_scripts': [
             'pre-commit = pre_commit.main:main',


Test patch: