Live data from Hacker News

Python 2 will be replaced with Python 3 in the next RHEL major release

access.redhat.com

311–320 of 341 posts

Re: Python 2 will be replaced with Python 3 in the next RHEL major release

#311
post #282

Earlier quoted context omitted.

The shims are managed by targetSdkVersion, i.e. if you declare targetSdkVersion >= 23, you will get the new permission system (because it was introduced in 23) if running on [23,maxSdkVersion] device; if it is running on device that has API level [minSdkVersion,23), you get the old one; if you declare it The targetSdkVersion says what you designed against. If you claim supporting the new API, you should handle the ne…

Except if you release a new/updated app, it MUST target a recent (less than a year) targetSdkVersion. "2019 onwards: Each year the targetSdkVersion requirement will advance. Within one year following each Android dessert release, new apps and app updates will need to target the corresponding API level or higher." https://android-developers.googleblog.com/2017/12/improving-...

That's Play Store policy for new apps and app updates, not a technical limitation of the OS. Old apps will keep working just like they did before, the new APIs will not break them.

Re: Python 2 will be replaced with Python 3 in the next RHEL major release

#312
post #278

I'm a Rubyist. Why are Python users so doubled down on keeping on with Python 2? I can't imagine using Ruby 1.8.x at this point, and even older versions seem well outside the realm of consideration.

Python is used in more places, with more cranky people.

Re: Python 2 will be replaced with Python 3 in the next RHEL major release

#313

Any leaks/leads when Red Hat will announce RHEL 8.0?

Indeed. I am currently struggling with the outdated Kernel of RHEL 7.x. Very frustrating.

What features are you missing in the RHEL7 kernel?

Re: Python 2 will be replaced with Python 3 in the next RHEL major release

#314
post #128

Earlier quoted context omitted.

>> It's just that we, as a community, will stop to pay the price for the ones that didn't move. If you want to stay there, you'll pay a commercial actor for it. That's very well put. But I guess this can happen only with big, important, projects where you can afford to loose/upset some users...

No that's just how IT works. Your games don't work in windows XP anymore. Actually, your USB3 mouse doesn't work on windows 7 out of the box. Centos have LTS, but still EOL. Ubuntu init system was changed to upstart. Then to systemd. Also gnome, then unity, then with new menu/notif/systray semantics, then back to gnome (but shell), and soon wayland. It breaks a lot of things. Firefox new addons don't work with some a…

Python broke compatibility a lot more than once. Python 3.5 and Python 3.6 are not compatible, for example. There are even cases where code written for an older version of Python 3 will not work on a newer version of Python 3. For example, see PEP 479.

Re: Python 2 will be replaced with Python 3 in the next RHEL major release

#315

As someone completely ignorant in everything python... can someone explain why Python 3 has never replaced Python 2?

For us the primary reason is because not only is Python 2 the default in RHEL 6 and RHEL 7 (and thus downstreams like CentOS and Scientific Linux), they don't even ship with Python 3 or have it in the base yum repos, so getting it installed on our thousands of diverse systems is nontrivial.

Furthermore we have a large base of scripts, owned by many people, that use Python as they would use bash, so changing the default Python on them will be like linking /bin/bash and /bin/sh to /bin/csh.

Re: Python 2 will be replaced with Python 3 in the next RHEL major release

#316
post #308

Earlier quoted context omitted.

I'm thinking about Google, Mozilla, Dropbox, etc. They still use a lot of Python 2.

Google created Golang and then created a tool to convert Python2 -> Go. https://github.com/google/grumpy

That grumpy project seems to have stalled in the last 6 months.

I feel like Google hasn't made much progress converting away from Python 2.

Python 2.7 is still required to build Chrome, for example, and I don't think there are any plans to change that. https://bugs.chromium.org/p/chromium/issues/detail?id=61357

And, I believe they use 2.7 whenever they use TensorFlow.

Re: Python 2 will be replaced with Python 3 in the next RHEL major release

#317

Earlier quoted context omitted.

Well, the CGI industry had money, competent people, and 10 years to upgrade. An entire decade. And a LOT of tooling and documentation to help. I made a lot of code conversion from 2 to 3. Most of them took me a couple hours to a few days. I'm currently working on a 2.7 project that will never migrate because they literally patched the cpython runtime, but you can't freeze a whole community because some will take bad…

> Well, the CGI industry had money, competent people, and 10 years to upgrade. An entire decade. And a LOT of tooling and documentation to help. I don’t think that’s a money issue. Python 3 upgrade is not really compelling. You get slower speed - at least until recently -, tests might pass on 3.x, but documentation and edge cases still are better on 2.x, etc. While nothing is really exciting in the 3.x branch.

The 3.x branch has developers committed to improving it and the 2.x branch basically doesn't. You shouldn't bet your horse on stagnation in a technology industry.

Re: Python 2 will be replaced with Python 3 in the next RHEL major release

#318
post #182

Earlier quoted context omitted.

> Node Great! Mostly no problem. The backwards-incompatible changes are few and seem to rarely be used in the projects I've seen. > PHP Totally different story. PHP does upgrade slowly, but many of the backwards-incompatible changes are almost impossible to detect without 100% code coverage. A lot of legacy PHP That said, I think bespoke PHP is less common than people think. The WordPress/Drupal/whatever installation…

We upgraded our bespoke, massive php5 codebase to php7 in a week. The much bigger upgrade was 4 to 5. We have something like 6 custom C extensions and that was a huge pain. php7 is a great language though. Worth the pain.

I believe you did that conversion and that it worked for you. I still don't think it's a slam dunk when you're talking about a stable, production product that can't have errors. It's almost impossible to do the conversion with static analysis alone, unless you know something I don't.

Re: Python 2 will be replaced with Python 3 in the next RHEL major release

#319
post #302

Earlier quoted context omitted.

People used to complain about the way Python changes were breaking their code. So it was decided to restrict all the non-reverse compatible changes to a separate version called 3 and to stop breaking things in 2. That probably allowed Python to become more popular than it would of otherwise, but at the cost of a significant fork. So what are you going to do? Either way has downsides. And it isn't like developers real…

Seems like the best approach here is to not introduce breaking changes to begin with. Go has done a very good job at this. And AFAIK most of the breaking changes in Java have been the introduction of new keywords and have been relatively easy to manage.

Python is a dynamic language; adding a new method or member to an existing class is a breaking change. You don't have that problem with Go and Java.
Post reply on HN