TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Extend Python 2.7 life till 2020

385 点作者 oal大约 11 年前

36 条评论

drewcrawford大约 11 年前
There are a lot of comments here from people who aren&#x27;t on the python-dev list and don&#x27;t really understand what this diff actually means.<p>The core developers are not required to maintain 2.7 post-2015, and most of them won&#x27;t be involved in it. That part hasn&#x27;t changed.<p>What is happening is that Red Hat is preparing to cut a RHEL 7 release, which AFAIK depending on how much you pay them they support for 13 years. So they will need to figure out how to support 2.7 themselves at least through 2027.<p>Here is where I am reading between the lines. RH are well within their right to fork Python and keep their maintenance patches to themselves and their customers (Python&#x27;s not copyleft). But, they are nice guys and so maybe they are willing to upstream their changes at least for awhile if there is still a Python project willing to accept them. Again, this is my speculation based on the ML discussion, not what RH has actually said they will do.<p>An analogy can be made to Rails LTS, a commercial fork of Rails 2.x that patio11 was involved in [0]. Inevitably somebody is going to step in to support 2.7, and so let&#x27;s see what we can do to avoid a situation where the only way to keep running 2.7 is to subscribe to RHEL.<p>Meanwhile, there are some large companies that use 2.7 extensively on Windows (e.g. Enthought, Anaconda) and the thinking goes that somebody can probably be found to produce a Windows installer once in awhile, assuming that Python.org will still host a download.<p>So really what is happening here is not very exciting. The core committers aren&#x27;t doing anything different than leaving the project as originally planned. What is happening is that they will leave the lights on in the source control repository and on the FTP server, so as to capture the free labor from people at large companies who have an interest in continuing to support 2.7.<p>The alternative is that RH and other vendors create proprietary and expensive forks of Python 2.7. That may end up happening anyway, but it will take longer for your employer to notice you should stop contributing your patches back if binaries still appear on python.org and you don&#x27;t have to ask IT to set up SCM and a bug tracker, etc.<p>[0] <a href="http://www.kalzumeus.com/2013/06/17/if-your-business-uses-rails-2-3-you-need-to-move-to-a-supported-option-asap/" rel="nofollow">http:&#x2F;&#x2F;www.kalzumeus.com&#x2F;2013&#x2F;06&#x2F;17&#x2F;if-your-business-uses-ra...</a>
评论 #7582505 未加载
评论 #7582521 未加载
评论 #7583472 未加载
评论 #7583905 未加载
chimeracoder大约 11 年前
This is really disappointing to see - I fear that it will slow adoption of Python 3 even further, when it was just reaching a tipping point[0].<p>When I first learned Python, I learned Python 3 first because it was newer, and I figured everyone would be using it soon enough. Little did I know that Python 2 would continue to be supported for over ten years after that!<p>Some people make a big deal about figuring out &quot;which&quot; Python to learn - that&#x27;s not really much of an issue, because Python 3 isn&#x27;t so different from Python 2 that it&#x27;s hard to pick up the other very quickly (especially given how much has been backported to 2.7). But it&#x27;s unfortunate to see people continuing to write new code in Python 2.<p>[0] <a href="http://python3wos.appspot.com/" rel="nofollow">http:&#x2F;&#x2F;python3wos.appspot.com&#x2F;</a>
评论 #7581596 未加载
评论 #7582095 未加载
评论 #7582410 未加载
评论 #7582082 未加载
评论 #7581930 未加载
评论 #7582164 未加载
评论 #7581526 未加载
yason大约 11 年前
How I&#x27;m not surprised.<p>Python 3 didn&#x27;t offer anything that would have been so useful and desirable that people would&#x27;ve jumped on it the moment it was released. In fact, it was actually a bit worse than Python 2 when it was out and those Python 2 users could continue enjoying loads of libraries to go with, and of course they knew how to navigate around Python 2&#x27;s quirks so why bother. Sadly, this is still what I think of Python 3: &quot;Why bother?&quot;.<p>Python 3 didn&#x27;t have enough to warrant a &#x27;v3&#x27;, really: Python 3 could&#x27;ve just been Python 2.7 if it wasn&#x27;t for the religious backwards compatility in Python, which, ironically seems to matter a lot. The syntactic and semantic differences weren&#x27;t big enough that Guido couldn&#x27;t have worked around the most important improvements into 2.x line and dropped less relevant stuff (like removing &#x27;print&#x27; statement etc).<p>Even if Python 2.7 would&#x27;ve needed some changes to existing libraries, the psychological barrier would&#x27;ve been lower. It&#x27;s about &quot;Fixing my lib to work with Python 2.7 which is top of the line today&quot; versus &quot;Porting my lib to Python 3.0 which will be the official Python in a few years&quot;: guess which one sounds more appealing? Note that the amount of work in both cases wasn&#x27;t that big.<p>I think mainstream Python will be 2.x till Python 4 is out.
评论 #7582262 未加载
评论 #7582017 未加载
评论 #7581881 未加载
eliben大约 11 年前
I think many folks are reading too much into this. &quot;Extended lifetime&quot; is bug-fixes. The final planned release is 2.7.9 in 2015 - beyond that there will be source-only releases for major security problems. No new features, no non-critical bug fixes.<p>So this isn&#x27;t really making Python 3 any less appealing. But the Python core developers cannot with a calm heart abandon all the users of 2.x, given the state of adoption today.
评论 #7582092 未加载
评论 #7584887 未加载
PythonicAlpha大约 11 年前
This is a result of some not so optimal design decisions in the past.<p>I remember, when Py3 first came out, everything was incompatible -- unnecessary incompatibilities like the u&quot; notation for Unicode string literals that was dropped. Unnecessary incompatibilities in the C-extension-module implementation layer. And so on. The list of incompatibilities was just huge.<p>Later several of them where dropped, like the string literal trouble ... But than the trouble was already done. Many extension modules where not lifted to the new version, since the overhead was to big.<p>I think, many more projects would have adopted Py3, if more extension modules would support it.<p>The huge library of extension modules was always the strength of Python. Now we have many projects still running on Py2, because Py3 did ignore this strength.
评论 #7581637 未加载
Udo大约 11 年前
Speaking as a Python outsider, this looks pathological. If backwards compatibility is such a big hindrance in switching from 2 to 3, why not ship a v2 legacy fallback interpreter along with the new stuff? If you wanted to make it fancy, you could even make a 3-to-2 bridge that allows people to run v2 code from v3.<p>Am I missing something here?
评论 #7582563 未加载
评论 #7582138 未加载
评论 #7584337 未加载
wirrbel大约 11 年前
The best way would be to release a python 2.9 which incorporates most of the changes from 2 to 3 but the unicode change.<p>The Δ between Python 2 and Python 3 was just too wide. Even with breaking changes, with a small Δ people will just migrate eventually. Migrating projects drag each other over the &quot;barrier&quot; just like water in a hose can be sucked over a wall.<p>The issue definitely was not the print command, but other things such as ``iteritems()``, etc - by themselves not much to keep you from migrating, but there is a pile of these boring changes next to the big one (unicode).<p>I think Guido overestimated the appeal of the new unicode handling and underestimated how resentful people are to change. I figure that at least 1&#x2F;4 of programmers are actually very opposed to each and every migration and a new version has to have enough incentives to counterbalance this built-in conservativeness.
crusso大约 11 年前
I just got back into some Python programming after a 2+ year hiatus from the language.<p>I&#x27;m stunned that this 2.x vs 3.x debate is still happening and that 99% of all libraries in use<i></i>* haven&#x27;t been converted to 3.x. I like the language, but ... damn... If it weren&#x27;t for the scikit&#x2F;numpy stuff, I&#x27;d stick with Ruby. The Ruby community seems much less fragmented and wants to see the language move forward. It helps a lot that the 800 pound gorilla, Rails, keeps up with Ruby releases.<p>edit: <i></i>* By that, I mean that the conversion rate for commonly used libraries hasn&#x27;t hit 99%.
评论 #7581866 未加载
评论 #7581679 未加载
评论 #7582565 未加载
评论 #7581684 未加载
评论 #7582006 未加载
reality_czech大约 11 年前
This is the path that all dynamically typed scripting languages must follow. Over time, change becomes impossible because the lack of typechecking or static analysis tools means that any change might break something in a subtle and hard-to-diagnose way. And so the language grows by accretion. You end up with something like bash or perl, where there are a million ways to do any one thing. Each way was added at a particular phase of the language&#x27;s life, and it could never be removed after that. And so the language becomes difficult to learn and unattractive to newcomers, so another scripting langauge pops up, and the cycle of life begins again.<p>Compare this to a language like golang, where you can just run &quot;go fix&quot; on your code to update it to the latest version. And you don&#x27;t have compatibility hell, because when you distribute your application, it&#x27;s a standalone binary. Stuff like go is the future. Get off the dynamic language hamster wheel.
评论 #7582004 未加载
评论 #7583715 未加载
评论 #7582845 未加载
makmanalp大约 11 年前
I see many comments talking about how this will slow down the migration process. But I don&#x27;t think the situation is that bad.<p>Most of the py3 wall of superpowers is now green (<a href="https://python3wos.appspot.com/" rel="nofollow">https:&#x2F;&#x2F;python3wos.appspot.com&#x2F;</a>) with boto, mysql-python, nltk, python-openid being some of the rare few in terms of not having great py3 alternatives. And most of these have ports on the way already.<p>So one interesting effect of this is that now that there is some critical mass and people are starting new projects in python3, there is now pressure on package maintainers to have py3 ports. So it&#x27;s users dragging the packages forward now rather than the packages dragging the users backwards.
评论 #7581687 未加载
评论 #7581860 未加载
评论 #7581760 未加载
评论 #7582584 未加载
评论 #7582231 未加载
TazeTSchnitzel大约 11 年前
Oh for god&#x27;s sake. Kill the damn thing already.<p>PHP 4 to 5 was a massive leap compared to Python 2 to 3, but they actually made that leap!
评论 #7581558 未加载
评论 #7581560 未加载
评论 #7581587 未加载
评论 #7581803 未加载
username223大约 11 年前
Good news. They have another 5-6 years to recognize their mistake and cut Python 3 loose from Python, like Perl did with Perl 6. It&#x27;s interesting how the same underlying mistake manifests itself in different cultures: Perl 6 was &quot;we&#x27;ll break all your code, but give you gonzo new features that we hope are useful.&quot; Python 3 was &quot;we&#x27;ll break all your code, but soothe some pedants and browbeat you into accepting the result.&quot;
borplk大约 11 年前
Damn. I hope my grandchildren see the day when Python 3 is commonplace.
评论 #7581490 未加载
评论 #7581504 未加载
overgard大约 11 年前
The lesson here is that it&#x27;s important to &quot;sell&quot; new versions of anything. You can&#x27;t just expect people are going to upgrade because it&#x27;s the new hotness. Older versions of your own software are often your biggest competitor. (See also: Microsoft and Windows 8).
评论 #7582825 未加载
评论 #7582895 未加载
shadowmint大约 11 年前
To be fair, what was the reasonable alternative?<p>Cede control of python 2.x to vendors who continue to demand support and bug fixes?<p>That would be a disaster; it&#x27;d be a moment away from new features and a 2.8 &#x27;cant believe its not python&#x27;.
undoware大约 11 年前
...also, he&#x27;s renamed it &quot;Python XP&quot;
Ellipsis753大约 11 年前
I just thought I&#x27;d like to know what Hacker News thinks. Will Python 2.x ever die?<p>I&#x27;m still writing lots of code with it and even quite a lot of new code. It&#x27;s been around for ages and it feels like almost no libraries have been ported to 2.x yet. On a couple of occasions I&#x27;ve started a project with Python 3.x just to drop it or move to Python 2.x as a library I need doesn&#x27;t seem to exist for Python 3.x and I don&#x27;t want to port it over myself. I&#x27;ve never had this issue with 2.x (no libraries support 3.x only.)<p>Most Python 3.x &quot;killer features&quot; have been back-ported to Python 2.x and I honestly feel little reason to upgrade myself now. When support for Python 2.7 is officially dropped we could fork it and continue. I would hope it wouldn&#x27;t take huge amount of effort for some people to support it? Just fix bugs and security issues and take pull requests? In that way might Python 2.x even outlive Python 3.x or at least remain more popular?
评论 #7585401 未加载
dehrmann大约 11 年前
The Python shop I used to work at, and this is a shop with some pretty big fanboys and apologists, wasn&#x27;t able to upgrade because of library support, and these are people who would like to.
danso大约 11 年前
For reference&#x27;s sake:<p>Python 2 was released Oct. 2000 and so will have a 20-year lifetime now. <a href="http://en.wikipedia.org/wiki/Python_(programming_language)#History" rel="nofollow">http:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Python_(programming_language)#H...</a><p>Ruby 1.8, which was retired last year, had 10 years of life: <a href="https://www.ruby-lang.org/en/news/2013/06/30/we-retire-1-8-7/" rel="nofollow">https:&#x2F;&#x2F;www.ruby-lang.org&#x2F;en&#x2F;news&#x2F;2013&#x2F;06&#x2F;30&#x2F;we-retire-1-8-7...</a><p>Obviously, version numbers don&#x27;t mean the same thing...and Ruby 1.8.x to Ruby 1.9.x (or even 2.x) seems less of a jump than 2.x to 3.x.
评论 #7586539 未加载
bmoresbest55大约 11 年前
I understand that changing to Python 3 can be expensive but really all that any company or person is doing is prolonging the inevitable. If they have a good product&#x2F;app&#x2F;etc. that will last it will have to change to Python 3 and sometime in the future, right? Why keep waiting? Why support something that is considered by it&#x27;s makers to be inferior? I really would like answers to these questions, if someone is willing.
评论 #7584335 未加载
piokuc大约 11 年前
Years ago, when I first heard about Python 3 and plans to improve the language my first thought was &quot;Yes! Multi-line lambdas are coming!&quot;, then I started reading more and found out that Guido actually wanted to _remove_ lambdas all together. I still remember the state of shock I was in after reading that, and a sinking feeling.<p>The lambdas stayed, fortunately, but, unfortunately, I&#x27;m still convinced the whole project was a bad idea. The cosmetic changes which make Python 3 incompatible with Python 2.7 are just not worth the trouble of breaking the compatibility. Has anybody ever tried to estimate the man-hours needed to port the myriads of great Python 2.7 libs to Python 3 and weight it against the advantages of subtle language improvements? I don&#x27;t think so. Plus, the big Python&#x27;s problems like GIL are still there in Python 3...<p>If it was up to me I would drop Python 3 and focus the development effort of the community on improving PyPy and porting libraries to it.
andhess大约 11 年前
Wow I&#x27;m very disappointed. I keep making the effort to transition more to 3, but am frustrated to see so many dependencies only work with 2.7, and thus maintain both libraries. I am tired of this limbo.
评论 #7586518 未加载
评论 #7581818 未加载
lucb1e大约 11 年前
This seems weird to me. Won&#x27;t this cause a fork in Python at some point, where the 2.7 developers continue on 2.8 or rename it entirely, and another fork continues on what is now Python 3?
评论 #7581817 未加载
评论 #7582766 未加载
评论 #7585257 未加载
评论 #7582365 未加载
andr大约 11 年前
Since there still won&#x27;t be a Python 2.8, I read this as the mainstream Python not evolving one bit for the next 6 years. For me, this would be grounds for moving to a different language.
评论 #7582542 未加载
评论 #7582170 未加载
评论 #7582166 未加载
ishbits大约 11 年前
Anyone know if RHEL 7 will ship with Python 3 in the base, even if not default? That could go a long way to boosting Python 3 adoption.<p>I know it&#x27;s in SCL, but that lacks convenience for a lot of users.
评论 #7581778 未加载
评论 #7581832 未加载
estebanrules大约 11 年前
Can anyone point me in the right direction of an article that sums up how this whole fragmentation started? I&#x27;m curious to know the history.
gaius大约 11 年前
By 2020 everyone will have moved onto OCaml anyway.
评论 #7583462 未加载
Walkman大约 11 年前
I just purged Python 3 from my computer. Will not serve much in the next 5 years I guess...
estebanrules大约 11 年前
I really thought this thread was a prank or joke when I saw the title. Sadly, it&#x27;s not. The whole 2.7 &#x2F; 3.x debacle is a large part of why I I have more or less stopped coding in Python and moved on to Ruby. The community is a large part of it as well.
gkya大约 11 年前
Which kind of means forever?
sigzero大约 11 年前
That is a huge mistake.
crimsonalucard大约 11 年前
This is like windows XP.
ssweens1大约 11 年前
Viva la 2.7!!!
评论 #7588387 未加载
stefantalpalaru大约 11 年前
I still want to see a Python 2 fork getting the care it deserves. I don&#x27;t trust the motivations of its current developers.
评论 #7581811 未加载
mirsimiki大约 11 年前
open a shell and type &#x27;import antigravity&#x27;
SEJeff大约 11 年前
Python 2.7.7 aka the Duke Nukem Forever edition!
评论 #7584314 未加载
评论 #7581535 未加载
评论 #7582417 未加载