by lykr0n · 7y ago · 0 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?
And, based on my experience, general open source is usually much more cutting edge than the larger distros, that’s the whole point.
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.
But good news, you don't have to do it. Python 2.7 will still work after 2020. We, the community, will just stop working on it for free. You can start paying us, or do the job for free like we did since 1991.
You can also migrate to another tech, but they will break things as well, and they won't give you 12 years to move. Ruby and node gave 2 years. Node forked 2 times. And it's a google based tech.
I'm tired of hearing complains, given how good you have it.
I would go so far as to say that Python 3.4 was the first one you could really use in production, that leaves you with 5 years to handle the upgrade. Still before that you should at least have started to add basic stuff like importing print_function and at testing all new stuff against Python 3. Many just kept ignoring Python 3 and wrote line after line of new incompatible Python 2 code.
I no longer feel sorry of those who are stuck on Python 2.7 and now have less than a year to upgrade. At this point it's your own fault.
You'd need insane test coverage, of all possible code paths, to be 100% confident.
Most of the conversion difficulties were related to Unicode/text/binary string handling in Python 3, and 2to3 didn't catch all of them. This was the biggest challenge of the entire process. Stuff would fail in production because due to improper string handling. Python 2 was remarkably permissive (i.e. loosy goosey), whereas Python 3 is stricter and arguably more correct, but this strictness has a cost.
The other class of problems is the restructure of certain std libs, like urllib. We took the opportunity to move away from "urllib" to "requests".
This site [1] was invaluable in understanding the migration issues.
All in all, apart from breaking Unicode issues, the migration process was fairly easy.
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).
That means the code was working with raw bytes, not utf-8 strings, so that's what you should convert to on Python3.
That means using `.encode()` and `.decode()` or using bytestrings.
Python3 doesn't break string usage, it makes you do it correctly. Expect a lot more of that kind of pain by moving to Rust (not saying it's not worth, you'll indeed get more correct programs done).
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.
No, Debian stable doesn't get bugfixes, only if those bugfixes are for security issues! (or some really severe bugs)
Example: Debian's Python is still 3.4.2, not 3.4.9!
Re latexmk: so am I getting the development release on Arch? I get the 2018 version with texlive-core.
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.