Live data from Hacker News

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

access.redhat.com

111–120 of 341 posts

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

#111

Earlier quoted context omitted.

The double standard when it comes to Python is mindblowing. No other language could have gotten away with such ridiculous fragmentation and perf regression for such a long period of time.

What do you mean by double standard? Everyone in the community, including the core developers, acknowledge that the 2 to 3 story was full of mistakes. They have promised not to make it again. And they took some actions to remedy the problems, and that's why Python 3 is finally succeeding. I recommend this presentation by Victor Stinner at FOSDEM 2018 which talks about it: https://fosdem.org/2018/schedule/event/python…

The double standard is that people still stick to Python despite those problems. If we're being honest and all conspiracy aside, imagine the same story for Ruby (a very similar language in terms of capability, features and performance), everyone would be laughing at them and the language would be pulling a Perl right now.

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

#112
post #95

Earlier 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…

I know some "tiny focused industry" that's still using DOS.

I see a DOS application running on XP all the time I go and visit the local doctor (social healthcare, regional center).

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

#113

Earlier 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…

Swift 3 is compiled. So you can provide the binaries and be ok.

Ruby 1.9 is a great example of why you should not be too nice: they told everybody "you have a fews months, deal with it". The community moved. Python said "poor things, we understand, take those tools and years to do the thing", and the community cried, and did nothing.

PHP literally failed. They canceled V6 and jumped to V7.

The funniest part ?

None of those languages are even close to Python popularity.

Swift is not even used for most Apple codebase. Python supported even Atari.

Ruby and PHP has almost no use case outside of the web. Python is used by OS, on the web, in GIS, by data analysts, for CGI, in AI, for sysadmin, to make GUI, video games...

And Python is much, MUCH older. 1990. 4/5 years older than Ruby/PHP. It has way more technical debt to pay. Swift ? 2014

Yeah the migration was badly handled from some aspects. But honestly, given the challenge and track record of the competition, it's not too shabby.

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

#114

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…

2.7 is a different language than 3.x. You could argue that 2.y is also a different language than 2.x but this is besides the point: as long as there is a compiler for that language and it works (for your definition of works) you don't need to translate your programs in another language just because you have money.

> you don't need to translate your programs in another language just because you have money.

True, but if you know the support behind your current language is going to go away, it might be smart to migrate.

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

#115

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…

2.7 is a different language than 3.x. You could argue that 2.y is also a different language than 2.x but this is besides the point: as long as there is a compiler for that language and it works (for your definition of works) you don't need to translate your programs in another language just because you have money.

You don't need to upgrade your servers to the lastest linux kernel either. But in 10 years, you won't get any security update for it, unless you pay a lot of money for it.

It will be the same for Python.

You want the excellent and money making free work of volunteers ? Do your part.

You don't want too ? It's ok. In 2020, plenty of companies will sale you services for the real market price of your technical debt.

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

#116
post #94
post #76

Earlier quoted context omitted.

Since Python 3.5 (3 years ago) type hints are part of the core syntax. Don't need to put them in comments. https://www.python.org/dev/peps/pep-0484/#type-definition-sy...

They badly need to update the docs, then. Almost everything I see on that page does this: vec = [] # type: Vector[float] vec = [] # type: Iterable[Tuple[float, float]] a = MyClass() # type: MyClass[int] x = Foo() # type: Foo[int]

Ugh that's because PEP 484 (which introduced 'proper' type hints) only introduced it for parameters and return types and implemented in Python 3.5. Type hinting bare variables was introduced with PEP 526 and implemented in Python 3.6.

While I really like the concept of PEPs, and I think keeping original (like as they were written) PEPs around are the right thing to do, I do wish sometimes that Python did a better job at incorporating changes from PEPs into the core documentation once implemented.

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

#117
post #38
post #12

Anyone know if /usr/bin/python will point to python3?

It already does ~ ls -las /usr/bin/python 0 lrwxrwxrwx 1 root root 7 Jan 5 02:36 /usr/bin/python -> python3

What distribution are you on?

My latest (!) stable Fedora still points at py2:

    ~ $ ls -als /usr/bin/python
    0 lrwxrwxrwx. 1 root root 7 Mar 14 14:36 /usr/bin/python -> python2*

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

#118
post #89
post #79

Earlier quoted context omitted.

Python could be written that way (2/3-compatible) as well and plenty of programs and modules were.

Uhhhh... sort of? I mean, I could go through all of the needless "why the hell did they make this partner incompatible also" stuff like, like removing u'' support (thai was added later), or all of the ludicrous breakage in the underlying APIs (like filesystem calls that made assumptions about character encoding that make no sense for the underlying Unix model and literally caused files to just disappear from iteratio…

it was possible to make a program that ran on both 2 and 3, but it required using "try" with no variable assignment and then digging into Python's exception reflection support to recover the variable.

What? The PEP that added the new syntax also added it to Python 2.6: https://www.python.org/dev/peps/pep-3110/#compatibility

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

#119

Earlier quoted context omitted.

2.7 is a different language than 3.x. You could argue that 2.y is also a different language than 2.x but this is besides the point: as long as there is a compiler for that language and it works (for your definition of works) you don't need to translate your programs in another language just because you have money.

You don't need to upgrade your servers to the lastest linux kernel either. But in 10 years, you won't get any security update for it, unless you pay a lot of money for it. It will be the same for Python. You want the excellent and money making free work of volunteers ? Do your part. You don't want too ? It's ok. In 2020, plenty of companies will sale you services for the real market price of your technical debt.

Is now 'ignoring security' the free pass that is thrown into every argument against opposing positions?

I'm being facetious about that; but you know that security risks can be reasoned and mitigated with different means (sometimes less costly) than simply upgrading software.

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

#120
post #114

Earlier quoted context omitted.

2.7 is a different language than 3.x. You could argue that 2.y is also a different language than 2.x but this is besides the point: as long as there is a compiler for that language and it works (for your definition of works) you don't need to translate your programs in another language just because you have money.

> you don't need to translate your programs in another language just because you have money. True, but if you know the support behind your current language is going to go away, it might be smart to migrate.

Yes but this is a different argument. He could have said "if you are smart" instead of "if you have the money". See?
Post reply on HN