V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
czheo
V2EX  ›  Python

python 2💊

  •  
  •   czheo ·
    czheo · 2016-11-24 06:42:47 +08:00 · 4939 次点击
    这是一个创建于 2681 天前的主题,其中的信息可能已经有所发展或是发生改变。
    29 条回复    2016-11-25 09:20:40 +08:00
    iRiven
        1
    iRiven  
       2016-11-24 06:47:49 +08:00 via Android
    Python 2.7 will retire in...

    3Years4Months18Days17Hours12Minutes19Seconds

    Enable Guido ModeHuh?

    What's all this, then?

    Python 2.7 will not be maintained past 2020. No official date has been given, so this clock counts down until April 12th, 2020, which will be roughly the time of the 2020 PyCon. I am hereby suggesting we make PyCon 2020 the official end-of-life date, and we throw a massive party to celebrate all that Python 2 has done for us. (If this sounds interesting to you, email [email protected]).

    Python 2, thank you for your years of faithful service.

    Python 3, your time is now.

    How do I get started?

    If the code you care about is still on Python 2, that's totally understandable. Most of PyPI's popular packages now work on Python 2 and 3, and more are being added every day. To ease the transition, the official porting guide has advice for running Python 2 code in Python 3.
    lty494685444
        2
    lty494685444  
       2016-11-24 09:09:15 +08:00 via iPhone
    看标题吓一跳…这不是还有三年呢么
    clino
        3
    clino  
       2016-11-24 09:24:50 +08:00
    还有3年 4 个月呢,拖延症患者表示两年以后再考虑...
    vicalloy
        4
    vicalloy  
       2016-11-24 09:54:23 +08:00
    看来以后的项目都得优先支持 python3 了。

    从 2 迁移到 3 的工作量其实还好。
    只是如果之前测试用例写的不完整,测试是个麻烦事。
    另外一些项目代码量已经很大了也是头痛。
    cyr1l
        5
    cyr1l  
       2016-11-24 09:57:23 +08:00 via iPhone
    微软早就说停止 XP , IE 678 了,然而你看看这国内市场占有率。

    IPV4 地址早就说用完了,然而你看看现在的 IPV6 普及率。
    fyooo
        6
    fyooo  
       2016-11-24 09:59:09 +08:00
    估计 2025 年国内业界还是一片 2.7.x
    yaku
        7
    yaku  
       2016-11-24 10:06:34 +08:00
    est
        8
    est  
       2016-11-24 10:07:21 +08:00
    还在用 centos 5 的企业表示 2.2 够用了。
    leotso
        9
    leotso  
       2016-11-24 10:21:00 +08:00
    @vicalloy 相当一部分的代码可以通过自动化工具转换吧 https://docs.python.org/3/howto/pyporting.html
    ps. Python 2 支持到 2020 年早就宣布了吧。。也不是最近的事
    salmon5
        10
    salmon5  
       2016-11-24 10:23:47 +08:00
    Python 2 还能再战 3-5 年。
    mashpolo
        11
    mashpolo  
       2016-11-24 10:25:16 +08:00
    centos 还是用 2.6 的,好久过期了,一直期盼过期好督促公司人切换到 3.0 来
    IanPeverell
        12
    IanPeverell  
       2016-11-24 10:37:07 +08:00
    还有 3 年就不用兼容 Python2 了,想想还有些激动呢
    Sylv
        13
    Sylv  
       2016-11-24 10:40:10 +08:00 via iPhone
    啥时 macOS 自带的 Python 版本能从 2 换到 3 呢?要不然分发些小脚本还是写 Python 2 方便啊。
    mnzlichunyu
        14
    mnzlichunyu  
       2016-11-24 10:48:47 +08:00
    这都不是事儿,还在公司写 python2.6 呢
    imbahom
        15
    imbahom  
       2016-11-24 12:06:18 +08:00
    三年后就可以考虑学习一下 python 了,恩
    raytlty
        16
    raytlty  
       2016-11-24 12:58:35 +08:00
    代码迁移其实还好啦, Python3 的新语法特性确实很不错。
    4641585
        17
    4641585  
       2016-11-24 13:26:32 +08:00
    @cyr1l 哪里能找到比较靠谱的资料吗?搜出来的不知道可靠性怎么样…
    vicalloy
        18
    vicalloy  
       2016-11-24 13:29:46 +08:00
    @leotso 并不是自动转完就可以一遍过的,很多地方还是需要自己做些调整的。
    就新项目而言,真没啥必要继续用 py2 了。
    如果你用到的哪个库不支持 python3 ,很可能是有了新的替代品。
    loading
        19
    loading  
       2016-11-24 13:30:05 +08:00 via Android
    举个例子…… windows xp
    qihboy
        20
    qihboy  
       2016-11-24 14:25:57 +08:00
    asp 到现在还没死呢
    smallaccount
        21
    smallaccount  
       2016-11-24 17:02:19 +08:00 via iPhone
    ios6 ,嗯哼?现在几乎没人用了。
    yoa1q7y
        22
    yoa1q7y  
       2016-11-24 17:04:56 +08:00
    eloah
        23
    eloah  
       2016-11-24 19:19:44 +08:00
    说不定会有 python2.8 呢
    doge
    chroming
        24
    chroming  
       2016-11-24 19:22:35 +08:00
    不急,到时候我估计已经不写 Python 了
    janxin
        25
    janxin  
       2016-11-24 19:42:02 +08:00
    各种 JIT Python 出来续一秒
    mingyun
        26
    mingyun  
       2016-11-24 23:55:48 +08:00
    公司项目还是 2.7
    lihanfeifan
        27
    lihanfeifan  
       2016-11-25 05:11:38 +08:00
    python 2 退休前会不会出 python 4 ?
    (我想说我没啥恶意。)
    eyp82
        28
    eyp82  
       2016-11-25 07:27:04 +08:00
    @lihanfeifan 也想到这个, 😀
    wyntergreg
        29
    wyntergreg  
       2016-11-25 09:20:40 +08:00
    想起了巨硬 IE
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2835 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 15:24 · PVG 23:24 · LAX 08:24 · JFK 11:24
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.