Stop using Python 2.6 please

Image from Fluent Python showing Python releases between 2006 and 2015 small sb_float

Python 2.6 has been around for over 7 years, first released in 2008 and last released in 2013 (as shown by the nice image provided by Fluent Python on Twitter and used with permission). It's unsupported software at this point as the Python development team only supports a feature release of Python with bugfix releases until the next feature release -- typically 18 months -- and provides security fixes for five years after the initial feature release (Python 2.7 is an exception with its bugfix/security releases going from its initial release in 2010 and ending 10 years later in 2020). In other words, unless you're paying for support through something like Red Hat Enterprise Linux, Python 2.6 is unsupported.

And yet people are still running it. Now I'm sure some people have legitimate reasons to stay on Python 2.6, and that's fine. Consider this blog post a plea directed at people who can move off of Python 2.6 to please do so for everyone's sake, from your code to the people whose code you depend on.

To users of Python 2.6

If you're using Python 2.6 and you're not paying someone to support it for you, please upgrade to Python 2.7. You're running software that is not being maintained for security or bugfixes and so you should consider upgrading for those reasons alone.

If you're using Python 2.6 on an enterprise Linux platform, please check if your Linux vendor supports Python 2.7. RHEL has their Software Collections support which provides a fully supported version of Python 2.7. There is an equivalent CentOS Software Collections for those on that platform. Switching to Python 2.7 will get you new features like set literals, set and dict comprehensions, etc. So while those of you who are RHEL and CentOS users aren't in the same position as those using Python 2.6 without paid support in terms of bugfixes, you are still missing out on some perks.

But one of the key reasons I'm asking you to upgrade to Python 2.7 is for the sake of the maintainers of projects you depend on. There are plenty of projects out there that are run by people who do everything they can to support their users, including supporting outdated versions of Python. That means they won't consider dropping support for Python 2.6 until you stop using it. That leads to those projects not getting to use the newer features in Python 2.7 to write better code that's easier for them to maintain. They also have to work around bugs in Python 2.6.9 which can be a real hassle (and I speak from experience as caniusepython3 works around some). Please realize that if you are using Python 2.6 voluntarily while using other projects in your code, your decision is having a network effect that is causing extra work that expands beyond just you. And this won't necessarily stop at your direct dependencies either, as those dependencies will then need to ask their dependencies to support Python 2.6 on your behalf, leading to your decision to stay on Python 2.6 impacting many people (this exact same line of argument applies to people not upgrading to Python 3, by the way).

To project maintainers who support Python 2.6

As I pointed out to users of Python 2.6 above, having to support Python 2.6 is a drain on your development time. You have to work around bugs in Python 2.6 that have been fixed in Python 2.7. You also don't get to use new features in Python 2.7 which help with maintaining a bug-free code base. It's simply a subpar situation to be in compared to not having to support Python 2.7 (and the same could be said when you have to support Python 2.7 compared to Python 3 only).

Unfortunately users can be a very conservative bunch. This means that some of them won't consider switching off of Python 2.6 until they are forced; if you're waiting for all of your users to drop Python 2.6 support you may be waiting for a very long time. That's why I'm asking you to consider making your next feature release only support Python 2.7 if you don't already to help pull users forward (I would also ask you consider your next major release to only support Python 3 to also help bring your users forward).

Please drop Python 2.6 support to make everyone's lives easier

The key message here is that using/supporting Python 2.6 is a drain for everyone involved. It makes code harder to maintain compared to not having to support Python 2.6 due to working around bugs and not getting to use features which make code maintenance easier. So if it's possible for you to drop Python 2.6 support, please take the time and effort to do so.

And expect a similar blog post on dropping Python 2.7 support sometime in 2016. 😉