5 ms·
Quite a nice presentation! 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 P
by gshulegaard 9y ago
Quite a nice presentation!
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.
- mixmastamyk 9y agoPython 3 has been available on most dists for 5-10 years.
- euyyn 9y agomacOS Sierra today tells me its python is 2.7
- mplewis 9y agoAnd Python 3 is available on macOS Sierra via Homebrew.
- msie 9y agoHilarious since Homebrew is written in Ruby...do you have to upgrade Ruby too?
- seanp2k2 9y agoYou should use homebrew to join the pythonistas club on Mac. Better yet, use https://github.com/asdf-vm/asdf/blob/master/README.md https://github.com/asdf-vm/asdf/blob/master/README.md to get all the pythons, rubies, nodes, and golangs you want. 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.
- melling 9y agoFurthermore, Python 2.x support will expire in 3 years. It's a lot less effort to install 3.x and use it now than plan, implement, and release a 3.x upgrade in 3 years.
- gshulegaard 9y agoThey have been pushing support back for 2 for a long while. 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.
- s-phi-nl 9y agoThat's true, but many users are still affected by that Python 2 remains the default. Any user can install a tool for Python 2 with pip install --user but the user might need root privileges to install a tool for Python 3 if the system administrator never intentionally installed it.
- gshulegaard 9y agoWhat I said was the default version of Python is old on most distributions. 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).
- mixmastamyk 9y agoCentos 6 is 7 years old, if you are still using that it is unfortunately your problem. It's not hard to write "python3" on a modern dist. Ubuntu has 3.5 and 3.6 is easily installable though not yet default 3.x.
- notsrg 9y agoYou think someone is going to start a new project and use a 7 year old OS? I don't think it's "unfortunately my problem" when biz/client reqs for a 7 yo OS are completely out of my hands, unless of course the mindset is "use Python 3 or die trying".
- mixmastamyk 9y agoAnd the other 96% of us can move on, no need to act like you're the majority. Py 2.6 is already EOL for almost five years.
- Volt 9y ago>no need to act like you're the majority Is he making that assumption, or are you?
- mixmastamyk 9y agoLet me reiterate, a 7 year old version of EOL software. Yes.
- archgoon 9y ago
- tyingq 9y agoThey are probably talking about "installed by default" vs available. Debian is still 2.x by default, and many of the Debian derivatives as well. Not that the default install drives the whole ecosystem, but there are cases where targeting an interpreter you know will be there is helpful.