终止对 python 2.7 的支持?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4836375/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
End of support for python 2.7?
提问by Stiivi
Is there a known date/timeframe when python 2.7 will not be supported any more in favor of python 3?
当 python 2.7 不再支持 python 3 时,是否有已知的日期/时间范围?
采纳答案by Marco Mariani
As of 13 Apr 2014, from http://hg.python.org/peps/rev/76d43e52d978(PEP 373, Python 2.7 Release Schedule):
截至 2014 年 4 月 13 日,来自http://hg.python.org/peps/rev/76d43e52d978(PEP373,Python 2.7 发布时间表):
The End Of Life date (EOL, sunset date) for Python 2.7 has been moved five years into the future, to 2020. This decision was made to clarify the status of Python 2.7 and relieve worries for those users who cannot yet migrate to Python 3. See also PEP 466.
Python 2.7 的 End Of Life 日期(EOL,日落日期)已移至未来五年,即 2020 年。 做出此决定是为了澄清 Python 2.7 的状态并减轻那些尚未迁移到 Python 3 的用户的后顾之忧. 另见PEP 466。
回答by Arseny
This articlesays: “When 2.7 is released, the 2.x line will move into five years of a bug fix-only mode.”
这篇文章说:“当 2.7 发布时,2.x 系列将进入 5 年的 bug 修复模式。”
So, as far as I see, Python 2.7 was the last 2.x feature-adding release, and though found bugs are going to be fixed (for some time), new features only go to 3.x releases.
所以,据我所知,Python 2.7 是最后一个 2.x 版本的特性添加版本,虽然发现的错误将被修复(一段时间),但新特性只会出现在 3.x 版本中。
回答by Frédéric Hamidi
In May 2010, Word of Godwas that patchlevel releases for Python 2.7 will probably be made for at least 6 years.
2010 年 5 月,神的话语是Python 2.7 的补丁级别版本可能会发布至少 6 年。
So, maybe 2016, probably later.
所以,也许是 2016 年,也许更晚。
Edit: Pushed back to 2020. See the revision to PEP 373, linked to in other answers.
编辑:推迟到 2020 年。请参阅 PEP 373 的修订版,链接到其他答案。
回答by Dr. Jan-Philip Gehrcke
PEP 373 (Python 2.7 Release Schedule)is the official source for the kind of information you asked for.
PEP 373(Python 2.7 发布时间表)是您所要求的信息类型的官方来源。
It currently says "Planned future release dates:"
它目前显示“计划的未来发布日期:”
- 2.7.7 May 2014
- 2.7.8 November 2014
- 2.7.9 May 2015
- beyond this date, releases as needed
- 2.7.7 2014 年 5 月
- 2014 年 11 月 2.7.8 日
- 2.7.9 2015 年 5 月
- 超过此日期,根据需要发布
Also, it says "The End Of Life date (EOL, sunset date) for Python 2.7 has been moved five years into the future, to 2020."
此外,它说“Python 2.7 的生命周期结束日期(EOL,日落日期)已移至未来五年,即 2020 年。”
Edited in April 2014, according to http://hg.python.org/peps/rev/76d43e52d978
2014 年 4 月编辑,根据http://hg.python.org/peps/rev/76d43e52d978
回答by Navid Rahimi
you should read this carefully (ref : https://news.ycombinator.com/item?id=7582300):
你应该仔细阅读(参考:https: //news.ycombinator.com/item ?id =7582300):
There are a lot of comments here from people who aren't on the python-dev list and don't really understand what this diff actually means. The core developers are not required to maintain 2.7 post-2015, and most of them won't be involved in it. That part hasn't changed. 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. 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'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. 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's see what we can do to avoid a situation where the only way to keep running 2.7 is to subscribe to RHEL. 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. So really what is happening here is not very exciting. The core committers aren'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. 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't have to ask IT to set up SCM and a bug tracker, etc.
这里有很多来自不在 python-dev 列表中的人的评论,他们并不真正理解这个差异的实际含义。2.7 post-2015 核心开发者不需要维护,大部分不会参与。那部分没有改变。正在发生的事情是 Red Hat 正准备削减 RHEL 7 版本,AFAIK 取决于您支付给他们多少他们支持 13 年的版本。所以他们需要弄清楚如何至少到 2027 年自己支持 2.7。这是我在字里行间阅读的地方。RH 完全有权利分叉 Python 并将其维护补丁保留给他们自己和他们的客户(Python 不是 copyleft)。但,他们是好人,所以如果仍然有一个 Python 项目愿意接受他们,他们可能愿意至少在一段时间内将他们的更改上传到上游。同样,这是我基于 ML 讨论的推测,而不是 RH 实际表示他们会做的事情。可以对 Rails LTS 进行类比,这是一个 Rails 2.x 的商业分支,其中涉及到了 [0]。不可避免地有人会介入以支持 2.7,所以让我们看看我们可以做些什么来避免出现以下情况:继续运行 2.7 的唯一方法是订阅 RHEL。同时,有一些大公司在 Windows 上广泛使用 2.7(例如 Enthought、Anaconda),并且认为偶尔会发现有人制作 Windows 安装程序,假设 Python.org 仍将托管下载。所以这里发生的事情真的不是很令人兴奋。核心提交者所做的与按原计划离开项目没有什么不同。正在发生的事情是,他们将在源代码控制存储库和 FTP 服务器上保持点亮状态,以便从有兴趣继续支持 2.7 的大公司的人员那里获得免费劳动力。另一种选择是 RH 和其他供应商创建专有且昂贵的 Python 2.7 分支。无论如何这可能最终会发生,但是如果二进制文件仍然出现在 python.org 上并且您不必要求 IT 设置 SCM 和错误跟踪器,那么您的雇主需要更长的时间才能注意到您应该停止提供补丁,等等。正在发生的事情是,他们将在源代码控制存储库和 FTP 服务器上保持点亮状态,以便从有兴趣继续支持 2.7 的大公司的人员那里获得免费劳动力。另一种选择是 RH 和其他供应商创建专有且昂贵的 Python 2.7 分支。无论如何,这最终可能会发生,但是如果二进制文件仍然出现在 python.org 上并且您不必要求 IT 设置 SCM 和错误跟踪器,那么您的雇主需要更长的时间才能注意到您应该停止提供补丁,等等。正在发生的事情是,他们将在源代码控制存储库和 FTP 服务器上保持开启状态,以便从有兴趣继续支持 2.7 的大公司的人员那里获取免费劳动力。另一种选择是 RH 和其他供应商创建专有且昂贵的 Python 2.7 分支。无论如何这可能最终会发生,但是如果二进制文件仍然出现在 python.org 上并且您不必要求 IT 设置 SCM 和错误跟踪器,那么您的雇主需要更长的时间才能注意到您应该停止提供补丁,等等。
回答by Raymond
Recently, that date has been updated to January 1, 2020.
最近,该日期已更新为 2020 年 1 月 1 日。
回答by chrki
The Python Developer's Guide lists the "Status of Python branches" from version 2.6 up to the current version, including their current support status with End-of-life dates.
Python 开发人员指南列出了从 2.6 版本到当前版本的“ Python 分支状态”,包括它们当前的支持状态和生命周期结束日期。
Currently supported (bug + security fixes):
当前支持(错误 + 安全修复):
- Python 3.8 (current master/development branch)
- Python 3.7
- Python 3.6
- Python 2.7 (until 2020-01-01)
- Python 3.8(当前主/开发分支)
- 蟒蛇 3.7
- 蟒蛇 3.6
- Python 2.7(直到 2020-01-01)
Security fixes only:
仅安全修复:
- Python 3.5
- Python 3.4
- 蟒蛇 3.5
- 蟒蛇 3.4
回答by Max
Python 2.7 wil be around forever. There is too much old code that uses it that no one wants to rewrite. There is already a fork called Tauthon, but we may see others if this pointless deadline gets real.
Python 2.7 将永远存在。使用它的旧代码太多了,没有人愿意重写。已经有一个名为 Tauthon 的分叉,但如果这个毫无意义的截止日期成为现实,我们可能会看到其他分叉。

