240 points · by htfy96 · 7y ago · 109 comments
A bit curious that 3.4 has been dropped, as that's the stock Python 3 shipped for CentOS 7.
I'm really upset at the distro vendors, they should have upgraded their base system Python scripts to 3.x years ago and just included 2.7 for legacy support. RHEL 7.0 came out in 2014 for goodness sake.
Not to sound condescending... But why does this single default matter that much?
I'm sure you install lot of things onto these machines which isn't there by default, right?
Why is installing Python 3 on top of all those other non-default packages such a problem?
14.04 (2014): Python 2
16.04 (2016): Python 2
18.04 (this is obvious but... less than 12 months ago!): you guessed it, Python 2 (!!!)
So, still in 2018 and until 2020 (when I guess the next LTS release of Ubuntu is scheduled) all instructions over the internet telling you to run "python" or "pip install" will run Python 2 if copied into your Ubuntu terminal.
I already said this in a previous discussion about Python 2 vs. 3: what a lost opportunity.
What package are you referring to? As I understand it there is no "stock" Python 3 in CentOS 7. There is just what you can get from secondary repos, like EPEL, SCL, and IUS. Those repos now have 3.6 available.
I need to reach out to the cmake3 maintainer because they just added it as a dependency and I have no idea why.
[root@localhost ~]# python --version
Python 2.7.5
RHEL 8 is where they are making Python 3 available as the system Python.https://developers.redhat.com/blog/2018/11/14/python-in-rhel...
Will that awesome async stuff help us migrate several 100s of thousands of lines of 2.7 code?
Yeah, right. There's a reason even companies with tons of resources like Google still use 2.7.
You'd need insane test coverage, of all possible code paths, to be 100% confident.
In the end I decided moving to Rust was less work than Python 3 (in terms of being sure my program was reliable and wouldn't error out with unicode errors).
3.6 has been dev and test since 2016
The next stable release (Buster aka Debian 10) is just starting the freeze process now and expected to come out this summer - Debian is in practice on a ~two-year release cycle, and regular support for each release lasts one year after the next stable release comes out. Buster will have Python 3.7 as default.
I already have apps that won't install unless 3.6 is there
Somehow I feel like every system that I want to keep updated stays on an old version, and every system that I want to keep pinned to some version just force-feeds me its updates...
There is backports, and I've thought about maintaining a newer Python interpreter in backports (when I was working for a company using Jessie and trying to use a Debian stack for everything and sort of wanting async syntax). You could introduce python3.6 or python3.7 as a new package in backports. But it would be extremely hard to update the Python modules in Debian to the newer version, too, because there's just a "python3-foo" package for each module, so you'd either have to recompile all binary modules and patch them to work on the newer Python as necessary (and patch anything using async or await as regular identifiers....), or you'd have to introduce an interpreter that intentionally wasn't compatible with modules installed as Debian packages. (Or you could introduce an interpreter that tried its best and failed randomly, which seems worse than either option.) I'm personally sympathetic to wanting to get /usr/bin/python3.6 from my OS even if the only useful thing to do is put a virtualenv on top, but I think it makes sense to just install Python yourself into /usr/local at that point.
Re latexmk, it looks like the volunteer maintainer hasn't updated it since 2015, and there's a culture of not stepping on people's toes and waiting a while before assuming they're inactive or no longer care. But it's been updated in the development release. The current changelog https://metadata.ftp-master.debian.org/changelogs/main/l/lat... has a bunch of "NMU" entries, non-maintainer uploads.
But I wouldn't want Debian to change their release behavior. And to be honest regarding different versions: Python has always been a special needs kid in this regard.
Spot on.
The NumPy 1.16.0 notes say
> Support for Python 3.4 been dropped, the supported Python versions are 2.7 and 3.5-3.7.
That definitely sounds like NumPy 1.16.0 doesn't support python 3.4.
seriously. I think we have to treat it as legacy code now.
Seriously, it’s been 10 years since Python 3 came out, Python 2.x has been supporting legacy code since then.
And let's not understate what a big deal it was to break compatibility like that. Porting a sufficiently complex project is non-trivial.
===
My company has >1 million line of python 2.7. About 1.5 year ago we managed to pass our test harness (about 80% line coverage) in python 3. At the moment we can't do that but we believe if we tried hard for a few weeks we can do it again too. I don't know how we define "legacy code" but I code in this codebase everyday and the code is actually very pretty and understandable. We also have a python 3 project (only a few thousand line of code) and god that code is definitely ugly as shit. Even after python2 goes unmaintained, I will still think our python3 code looks more like legacy.
Can you please give some examples? I've recently picked up Python 3, wondering what well known traps I should avoid.