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…
Python 2 will be replaced with Python 3 in the next RHEL major release
111–120 of 341 posts
Re: Python 2 will be replaced with Python 3 in the next RHEL major release
#112Earlier 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.
Re: Python 2 will be replaced with Python 3 in the next RHEL major release
#113Earlier 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…
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
#114Earlier 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.
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
#115Earlier 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.
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
#116Earlier 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]
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
#117Anyone 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
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
#118Earlier 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…
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
#119Earlier 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.
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
#120Earlier 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.