Live data from Hacker News

Sunsetting Python 2

python.org

441–450 of 733 posts

Re: Sunsetting Python 2

#441
post #27

Earlier quoted context omitted.

I'm no Python insider, but Google has quite a lot of projects based on Python 2, including build scripts for recently released software, so I'm guessing they could at some point maintain their own Python 2 branch (which, again, I'm guessing is much less work than porting a huge amount of script code over to 3 for no material benefit).

They already have one - look in their type checker repo for patches that add certain Python 3 features (type annotations) to Python 2.

That's sort of hilarious... What are the incentives that prevent Google from upgrading their python 2 scripts to python 3? I guess it's more productive globally to stick with a supported version of Python 2.

Re: Sunsetting Python 2

#442
I hope the Raspberry Pi community really switches to Python3 soon.

I've looked at the PiStorms stuff MindSensors (Lego Mindstorms compatible). Unfortunately it all seems to be just Python2 based.

Looking at all the code it seems you're always basically running your own event loop (infinite while True: loop). I think it'd be really awesome to utilize Python 3's asyncio package to write more event driven programs.

Writing code in asyncio is basically a different paradigm. It's not like Golang where you can write a function and not care if someone is calling it synchronously or starting a goroutine with it. With Python asyncio it seems for every good library out there someone has a create an asyncio version of it. For instance "requests" vs. "aiohttp".

So, while embracing Python 3 still wouldn't get me what I ultimately want, it's a first step in the right direction.

Re: Sunsetting Python 2

#444
post #159

What surprises me about this is that the documentation for Python 2 does not explicitly say that the language version is about to be unsupported, see e.g. https://docs.python.org/2/library/zipfile.html Contrast this with the Postgres website, which tells me I'm browsing old docs (because Google still offers old links), see e.g. https://www.postgresql.org/docs/9.2/tutorial-window.html Are there plans to add a banner t…

Python 2.7 isn't yet unsupported, so it doesn't compare to the deprecated Postgres version you linked to. Click through to the oldest _supported_ Postgres version, and it isn't clear when _it_ will lose support - no banners at all - , just like the currently supported Py 2.7.

Re: Sunsetting Python 2

#445

Earlier quoted context omitted.

It's interesting seeing who the holdouts are, though. Less than a year ago, the CEO of Sentry (the crash reporter) locked a Github thread with essentially "we'll get there when we get there, sometime in or after 2020." But then, as late as 2016 their stance was pretty much that they would never migrate, so I suppose it's not surprising that they aren't super prepared for it: https://github.com/getsentry/sentry/issues…

Calibre is another well known case, and they don't plan to migrate. Actually, I can't wait to remove it from my hard drive on Jan 1, since it's one of the most poorly designed apps I've ever used. It's really not surprising at all that they're not able to migrate it, assuming the quality of the app is indicative of the quality of the code. I wouldn't be surprised if the same was true of a lot of applications that are…

And make a gnome core app with GTK3? That would pretty cool :)

Re: Sunsetting Python 2

#446

Going forward, I'll be maintaining Python 2.7 for the indefinite future. This will be under project name "Bladders". (Python is named after Monty Python's Flying Circus. There is another fantastic British comedy called Black Adder, and the main character is sometimes called "Bladders" as a contraction of Black Adder.) Unlike Tauthon, I won't change the language at all, only maintenance. I'm also going to make a curat…

But... why? Python 3 has been "good enough" since 3.4. By 3.6, it was markedly better than 2. With the upcoming 3.8, it seems to be better in every way (including performance!).

I loved Python 2 for a long time. It was a beautiful language. But after seriously using 3, I would never go back. As in, I would turn down job offers involving Python 2 in any other context than "we're hiring you to help us upgrade".

Re: Sunsetting Python 2

#447
post #96

Earlier quoted context omitted.

Totally agree, there's some degree of arrogance, especially in that section of the article. Maybe it's unintended, developers are not always good at PR.

> Totally agree, there's some degree of arrogance Me too. Anyone who's running 15+ year old free software which came with 6 or possibly 12 years of notice to upgrade to the new version (depending on how you count it) and is complaining that it's no longer going to be supported for free by someone else, is being quite amazingly arrogant... Maybe it's unintended, users of free software are not always good at being grac…

Yes, those people are arrogant and/or entitled, but you know darn well that's not the arrogance GP was talking about.

It's also arrogant to grab Python 2 out of the hands of people still using it and flush it down the toilet.

As choppaface said,

> Perhaps the killer feature missing from Python3 is a flexible, built-in Python2 runtime. Then maybe the transition would not have met such pushback.

If Python 3 could run Python 2 code (even at just the granularity of modules) then all of this mess could have been avoided. I love Python and I love GvR, but he stumbled badly here IMO (not as badly as Perl 6, but that's small comfort) by trying, in effect, to cannibalize 2 for 3. I don't enjoy saying this.

I've met GvR briefly and he didn't seem arrogant at all to me. But I do find the attitude of "Hey, F. U." to those of us who want to keep using Python 2 to be pretty arrogant.

Re: Sunsetting Python 2

#448
post #78

With the sunset date passing, Python 2 is going to become a niche while still having a massive install base. There's a lot of money to be made doing migrations and keeping the beast itself alive.

Yeah, that's my career for the next ~20 years...

I'm not complaining. I like Python 2.

Re: Sunsetting Python 2

#449

Earlier quoted context omitted.

I don't necessarily think you're wrong, but HN has a history of comments like this that criticize other comments and add nothing to the discussion. Mine is another example, but since you got the ball rolling I figure I might as well chime in. I think the grandparent's usage of "use case" was totally fine. It wasn't distracting and it didn't change my reading of that comment in any way, shape, or form.

> HN has a history of comments like this that criticize other comments and add nothing to the discussion I disagree. HN is a place that seems to pride itself on the quality of its discussions, and on a higher intellectual caliber when compared to other Internet discussion venues. Surely a good command of language is part of that?

Yes, it does pride itself on the quality of discussions. It also has done that just fine using the voting and flagging mechanisms. When I see comments criticizing others' comments I am always reminded of reddit. I think this is exactly what you're hoping to avoid when you come to HN.

Beyond that, who are we to judge what constitutes "good command of language?" Which language are we even talking about here? I don't think HN is going to become a better place by becoming more elitist.

Re: Sunsetting Python 2

#450
post #4

Earlier quoted context omitted.

No, the benefit of FOSS is that if the group developing a product does not support it anymore, you are free to fork it and support it yourself. And I am sure we will see a fair share of people doing that. What I am not sure is of anyone doing so will have the shoulders to actually support it. Python 2.7 was released 1 decade ago. That's quite a long transition time.

Tongue in cheek comment; C was released 47 years ago and is still supported... but then again, that shows a very different philosophy between system languages and scripting languages.

I know you're writing tongue-in-cheek, but if you look at early C code you'll find it's not really supported today. The Lions book is full of "interesting" type magic, for example.

However the best analogy for python 2to3 is probably the prototyping changes of ANSI C, and we similarly offloaded the conversion of that code to external tools (protoize(1) and unprotoize(1)).

Post reply on HN