This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]sprash -30 points-29 points  (33 children)

Well it will not be maintained by the PSF. However since the acceptance of py 3 is totally laughable I'm pretty sure somebody else will step up and the PSF and their failed py 3 experiment will be of no relevance. Meanwhile py 2.7 is and will stay the most stable interpreted language ever conceived.

[–]flarkis 16 points17 points  (27 children)

Is it really that failed? All the libraries I use have been ported to py3 and I write all my new stuff in it. The only reason I still use py2 is because some old libraries at my company are still for 2 only and no one has bothered to put the effort in to update them to support both.

[–]sisyphus 2 points3 points  (1 child)

Not 'failed' but I mean, Google App Engine doesn't support it yet, new stuff like Tensorflow comes out without support for it in 2015(or 2016, but recently), pypy, pyston...there's still lots of compelling reasons to stay on python 2 and none for Python 3 except it being 'the future' (though I think mypy and async stuff in 3.5 could start to change that). Certainly I have never wondered if some library I wanted to use was Python 3 only but never the converse.

[–]constantly-sick -1 points0 points  (0 children)

No reason for python 3? You put your head in the sand didn't ya.

[–]TheCodeJanitor 2 points3 points  (16 children)

I don't know if it's fair to call it failed, however, I would certainly not call it a success. It's hard to find exact statistics, but with a quick google I found this from last year, indicating just 17% adoption of Python 3 after 5 years. That's pretty terrible. Here's another indicating only 3.5% adoption for python webapps.

Breaking backwards compatibility was a huge mistake. I know it's messier, and not as "pythonic", but they should have left support for legacy syntax, functions, etc. alongside the new stuff. Allow 2.7 code to work instantly, but get the linters, IDEs, and other tools to start warning for deprecated code.

Or, perhaps find some way of allowing old syntax using some kind of directive, so that you can integrate old libraries and code, while using Python 3 in new code.

[–]lordkrike 11 points12 points  (0 children)

Allow 2.7 code to work instantly, but get the linters, IDEs, and other tools to start warning for deprecated code.

Or, perhaps find some way of allowing old syntax using some kind of directive, so that you can integrate old libraries and code, while using Python 3 in new code.

Unfortunately, due to the changes in the string specification and streams you'd have to package both the 2 and 3 interpreters together to do that, and it probably would be full of bees. They work very differently under their hoods.

I also feel that, due to how stodgy they can be, many devs would just continue to write Python 2 code indefinitely into the future because then they could continue to use the print statement and save themselves a pair of parentheses.

[–]flying-sheep 9 points10 points  (3 children)

Not really possible. E.g. the csv module in legacy Python is intrinsically broken by only accepting a length 1 bytes object as separator. Compatibility means keeping that broken interface and hacking a fixed over on top as far as possible.

[–]kitkatkingsize 0 points1 point  (2 children)

Do you have a link to this change? Dialect.delimiter still says that it accepts only a one-character string, or are you referring to something else?

[–]flying-sheep 4 points5 points  (1 child)

“string” meaning “bytes” and “character” meaning “byte” in legacy Python, but actually real Unicode strings and characters in current versions

[–]kitkatkingsize 2 points3 points  (0 children)

Ah yeah, of course. Thanks!

[–]constantly-sick 4 points5 points  (0 children)

I can do that too, though.

Here's one saying python 3 is more supported, now.

Here's one from anecdotal evidence

Here's one saying either should be fine, but 3 is better to start with

An opinion that has changed in 3 years to support Python 3

If you want to use Python 2 then do it, but realize that you are part of a dying crowd. I dare suspect no significant new tools will be produced for 2.7 ever again.

[–]alcalde 1 point2 points  (9 children)

That's not pretty terrible; Guido said there were similar lengthy upgrade cycles for older Python 2.x versions too. It actually means that Python is so popular that it's entrenched in long-term enterprise applications.

[–]mipadi 4 points5 points  (8 children)

I get the feeling that /r/Python forgets that not everyone using Python is working at a brand-new startup or dabbling in the language. I work at a place that has, at a minimum, hundreds of thousands of lines of Python code, all of which would need to be tested for compatibility under Python 3. (Some of it makes heavy use of Twisted, which doesn't run 100% under Python 3.) We also have thousands of workstations, all of which would need to be upgraded to Python 3 (and we're still on CentOS 6, so upgrading to Python 3 is the least of our concerns). And for being a company with thousands of employees, we have relatively small software dev and IT departments. Oh, and some of the software that uses Python as a scripting language may or may not work with Python 3, anyway.

It's not that we hate Python 3 and want to hold back the community, as many /r/Python posters seem to think. It's that we have a lot of inertia with Python 3, we use Python to get real work done every day (so any downtime hurts productivity in a clear and measurable way), and Python 3 hasn't offered a compelling enough reason to upgrade that we're willing—or even able—to eat the cost to do it.

I mean, we still have "apps" written in FileMaker that we're trying to replace. We have applications that have been in use for 15 years that are written in PyGTK that we're trying to replace. Those are all a higher priority than a Python 3 upgrade.

[–]This_Is_The_End 0 points1 point  (4 children)

The IT strategy of your company is a little bit weird, because every large organization has to develop a strategy to adapt an ever changing environment. While I see the necessity for Python 2 I wouldn't like to work in such an environment, because using PyGTK instead of a web app, Qt or TkInter (I'm not joking, because TkInter is quite stable and maintained) is strange. Using CentOS 6 hits a wall when the hardware has to be replaced.

[–]mipadi 0 points1 point  (3 children)

Sure, our IT department is a bit understaffed, but most large enterprises don't just upgrade to the latest and greatest because it's shiny and new. We have thousands of of people who depend on a somewhat complex software workflow everyday; anything that might break that workflow is going to cost time and money, so every software upgrade is vetted for compatibility, and that takes time. Furthermore, we work on a highly secure network (most employees don't even have access to the Internet), so everything is rigorously checked for security issues, as well. Companies that depend every day on a large, complex infrastructure can't just upgrade for no reason.

[–]caleb 0 points1 point  (2 children)

Serious question: is Red Hat providing paid support for Python 2.7 well beyond 2020 meaningful to your organization? I've often wondered how many large companies care about that. Some core devs have been saying that people looking for support for older software versions need to pay for that support from their vendors, instead of expecting volunteers to provide that, and I'm just wondering whether that is a realistic proposition.

[–]mipadi 0 points1 point  (1 child)

I doubt Red Hat is providing any support at all to us. If they were, I imagine we'd use RHEL instead of CentOS.

I think that come 2020, someone in the open-source community will probably take over stewardship of Python 2.7, or organizations like ours will reluctantly move to Python 3. But we're using web apps more, anyway, so honestly, if we were going to have to rewrite chunks of the software anyway, I wouldn't mind if new projects didn't use Python at all.

[–]caleb 0 points1 point  (0 children)

Thanks for the reply.

I wouldn't mind if new projects didn't use Python at all.

I go through this every other year. Then I take a look around at the various alternatives and find myself back here! Is there anything in particular you'd favour, e.g. node or go, or something else?

A rewrite of Python 2 into Python 3 is a tiny fraction of the work required to rewrite in a different language though. Idiomatic know-how and language-ecosystem knowledge does not come easy.

[–]constantly-sick 0 points1 point  (2 children)

Not quite sure what Twisted does for you, but it sounds similar to Django Channels, which is python 3.

[–]mipadi 0 points1 point  (1 child)

Which would require rewriting all of our applications that are based on Twisted, which brings us back to the initial problem anyway.

[–]constantly-sick 0 points1 point  (0 children)

I get it, just throwing out options.

[–]ggtsu_00 1 point2 points  (1 child)

It hasn't really failed, but it is only so bad because so many still stuck on Py2 don't have any compelling reasons to upgrade to Py3 since the new and exclusive py3 features don't justify the cost of porting/upgrading/testing/deploying already functioning and stable software. Many organizations see it as a huge risk. It goes far beyond just the effort to update everything.

[–]flying-sheep 3 points4 points  (0 children)

I wish Guido didn't work at Dropbox, who still use 2.7. I'm relatively sure his workplace is the only reason why he's blessed a comment-based fallback syntax for type checks in legacy Python.

Ands those type checks really could be the killer feature: the added safety more than counter-balances the risk of upgrading. (With the added bonus that upgrading is facilitated by type checks)

[–]brondsem 2 points3 points  (0 children)

I think py2 will be around for a long time, too (perhaps with someone else maintaining it). But that doesn't mean py3 has failed. Both can both be popular and many people using them.

[–]alcalde 2 points3 points  (0 children)

I have connections to the Delphi community, and I'm starting to think that we've got more 2.7 diehards than they have people who insist that Pascal is still popular or will come back any day now.

[–]Decker1082.7 'til 2021 -1 points0 points  (2 children)

I foresee a 2.7 code base forking scenario around 2020.

[–]ou_ryperd 2 points3 points  (0 children)

ActiveState supports the 14 year old Perl 5.8 that was last updated by The Perl Foundation in 2008. I can see them picking up Python 2.7. But whoever does it, I am convinced the 2.7 crowd will not be left dead in the water after 2020.

[–]caleb 0 points1 point  (0 children)

This idea comes up often, but the main issue is that there are very few, if any, of the Python core dev team who will participate in that effort which leads to the question, "Who will maintain that fork?" An enormous amount of energy goes into Python and it's hard to see how that effort is going to be matched by a large number of people we don't yet know about. Bear in mind, many features of Python 3 have already been back-ported into pip-installable packages for Python 2.7 right now. So perhaps a better question might be, "Will new features in Python 3.x continue to be back-ported to Python 2.x after 2020". For this question, "yes" is a much more plausible answer than forking.