For example, CentOS 6 ships with Python 2.6 out of the box. Even faster moving distros (like Ubuntu) are still trying to make Python 3 the default (although at least Ubuntu ships with both 2.7 and 3.4+ out of the box).
It's not the default because /bin/python is synlinked to python2. You have to explicitly run it.
That's not very true.
- Most BSDs and MacOS still don't have it installed by default.
- RHEL/CentOS still don't have it installed by default.
- Ubuntu LTS didn't get it by default until 14.04. (3 years ago) (mainline ubuntu got it in 13.04, 4 years ago)
Ubuntu has 3.5 and 3.6 is easily installable though not yet default 3.x.
Py 2.6 is already EOL for almost five years.
Is he making that assumption, or are you?
Not that the default install drives the whole ecosystem, but there are cases where targeting an interpreter you know will be there is helpful.
But I agree with you:
> or just write Python 2.7/6 code that is forward compatible with Python 3...in which case I still can't use the new features of 3.
Although, personally, I think the best thing to do is write forward compatible Python 2 code (or at least as much as you can). At the very least write Python 2 code that lends itself well to using a migration tool like 2-to-3.
Ubuntu 18.04 LTS plans on Python 3-only, but Ubuntu has been shipping Python 3.x since 13.04 and 3.x is the default with 2.x available since 16.04 , so in terms of shipping Python 3 code, Ubuntu 12.04 LTS (the last LTS where you can't assume it has a python 3) EOL'd on April 28 2017. Assuming $WORK follows EOL depredations, you should be fine for Ubuntu.
But I just wanted to point out that the title is a bit presumptuous. I don't refuse to upgrade to Python 3, it's that the default Python for most distributions is 2 (sometimes as far back as 2.6). If you want to write a user-space tool with Python you can either require additional dependency setup, bundle a full interpreter with your package, or just write Python 2.7/6 code that is forward compatible with Python 3...in which case I still can't use the new features of 3.
At the end of the day, the continued slow adoption of Python 3 today is because ecosystems move slowly. Not to mention the original releases of Python 3 were really rough around the edges (such as being slower than Python 2.7 until ~3.4) which definitely contributed to the slow adoption in the early years.