Earlier quoted context omitted.
It's not that hard unless you had some very advanced code utilizing Python 2 internals that were significantly changed in Python 3. However, conversion takes a lot of time and if something works, why should you be forced to change it?
Various intranet pages at my company "work" in IE6/7 or whatever and nobody seems to be rushing to fix them. That kind of sucks, though.
Python 2 will be replaced with Python 3 in the next RHEL major release
201–210 of 341 posts
Re: Python 2 will be replaced with Python 3 in the next RHEL major release
#202Earlier quoted context omitted.
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…
> Your games don't work in windows XP anymore. In fact I can play EarthSiege 2, a game from the 3.11/Win95 era, just fine on Win7 x64 with the only things not working being joystick input (I guess it does some shenanigans with the MIDI/joystick port in addition to using the windows joystick API) and the pause screen which shows your vehicle spinning around spins too fast (probably because its speed is tethered to CPU…
Re: Python 2 will be replaced with Python 3 in the next RHEL major release
#203Earlier quoted context omitted.
> most popular packages are now compatible with Python 3 I often see this but I think it's a perception from the Internet/web world. I work for CGI, all (I'm not kidding) our softwares (we have many) are 2.7. You will never see them used "on the web/Internet/forum/network" place but the day-to-day job of millions of peoples in the industry is 2.7. And we are a tiny focused industry. So I'm sure there is many other in…
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…
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.
Re: Python 2 will be replaced with Python 3 in the next RHEL major release
#204Earlier quoted context omitted.
I think it's the opposite. When other languages make incompatible changes, they have serious problems (e.g perl6). Previous versions of python were back-compatible. Java versions stress back-compatibility. I don't know if HN can find any counter-examples, of a language that thrived through an incompatible, code-breaking upgrade. Python has done everything possible to avoid this fate, by maintaining 2.7. And I'm not e…
I don't know if HN can find any counter-examples, of a language that thrived through an incompatible, code-breaking upgrade. Of course. Swift 3 is one example. Ruby 1.9, as others have pointed out, is another. PHP is yet another, and perhaps more relevant because it is close to contemperaneous. It had its "Python 3 moment" with the migration to PHP 5. Lots of BC breakages.[0] That transition took about 3-4 years for…
When trying to learn it, I encountered incompatible examples and tutorials, complex and changing ways to update it... and then my toy code stopped working. I eventually found the cause of the code-breaking change, fixed it... thought a bit, and decided against ruby. That's just me though.
Re: Python 2 will be replaced with Python 3 in the next RHEL major release
#205`brew install python` also installs python3 now
yes and it took me a while to fix things. I still need to maintain my python2 code
Re: Python 2 will be replaced with Python 3 in the next RHEL major release
#206This is good: - Python 2 support officially ends somewhere in 2020 - most popular packages are now compatible with Python 3 - Python 3.7 performs about as well as 2.7 with future release expected to be better Although it still took way too long, if you consider Python 3.0 was released about 10 years ago.
You forgot one: - 90% of business code is written in Python 2.x
Re: Python 2 will be replaced with Python 3 in the next RHEL major release
#207Earlier 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…
Re: Python 2 will be replaced with Python 3 in the next RHEL major release
#208I think this has been the ugliest, most badly managed update for a major language since Perl6. And this is not completely over, yet. Over the next 5 years I still expect to see people complaining about this Python3 thing. I hope the designers have learned a lesson.
Re: Python 2 will be replaced with Python 3 in the next RHEL major release
#209Earlier quoted context omitted.
#!/usr/bin/env python2 There, fixed it. Much like `#!/usr/bin/env bash` for bash scripts instead of `#!/bin/bash` (which won't work on many OSes) https://github.com/search?q=%23%21%2Fusr%2Fbin%2Fenv+python2...
You can't "there fixed it" for the infinite number of projects that exist in the field that this breaks. "It never worked on FreeBSD" is very different from "it no longer works on new versions of RHEL".
Of course you can. Python files are plaintext.
$ find ./some/module -name "*.py" -exec sed -e 's:#!/usr/bin/python:#!/usr/bin/env python2:g' -i {} ;Re: Python 2 will be replaced with Python 3 in the next RHEL major release
#210The Internet may switch to 3 but industry will stay on 2.7 for the next decade and no EoL will change that. There is absolutely nothing that can change that because there is zero benefit to rewriting a decade's worth of code and no manager will authorise that. So don't bin those 2.7 books just yet if you want a job at a big co.
To some degree, you may be correct, that there will be companies that refuse to upgrade for many years. By and large, I think most people will start to switch:
* Small orgs will begin to see costs of maintaining legacy code skyrocket as it becomes harder and harder to get 2.7 interpreter support for newer kernels. Those that aren't already transitioning now will eventually bite the bullet.
* Medium orgs will probably be the laggards. They have enough funds to pay someone else to make compatible interpreters for them. Your observation about manager authorization very likely applies here so many probably won't bother to upgrade without an internal skunkworks-style initiative.
* Large orgs will upgrade. Their infosec departments will freak out that an old, "potentially insecure" language is being used, regardless of third party vendor support. I see this a fair bit now in the PHP space; where RHEL supports and backports patches for old, insecure versions of PHP, but the infosec people still can't stand it. These days, infosec is getting more and more pull in every huge organization, so it wouldn't surprise me at all to see them start to treat 2.7—or the old, un-updated packages that are locking someone to 2.7—as a possible attack vector and force a change.
All that said, you are right about jobs. If someone knows 2.7 inside and out, they will start to see higher and higher paying contract gigs over the next 15-20 years. Just like the COBOL programmers saw.