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
waibunleung
V2EX  ›  Python

为什么 scrapy 框架选择使用 Twisted 而不是 asyncio+aiohttp 等实现?

  •  
  •   waibunleung · 2019-08-26 12:01:24 +08:00 · 3283 次点击
    这是一个创建于 1695 天前的主题,其中的信息可能已经有所发展或是发生改变。

    如题,两种方案都是异步,为什么选择了 twisted 而不是 asyncio ? 求解疑

    8 条回复    2019-08-27 12:36:53 +08:00
    wwqgtxx
        1
    wwqgtxx  
       2019-08-26 12:20:54 +08:00 via iPhone
    因为当初开发时候的还没有 aiohttp
    wzwwzw
        2
    wzwwzw  
       2019-08-26 12:23:43 +08:00
    可以看下 scrapy 开发的时候有没有 asyncio。
    ipwx
        3
    ipwx  
       2019-08-26 12:49:47 +08:00 via Android
    历史决定了只有 twisted 才能救 scrapy... 完了编不下去了
    iPhoneXI
        4
    iPhoneXI  
       2019-08-26 12:52:52 +08:00 via Android
    Python 2 时代,那会儿就 Tornado/Gevent/Twisted
    Dustyposa
        5
    Dustyposa  
       2019-08-26 13:34:38 +08:00
    说不定正在开发 异步版本呢 。
    requests3 是正在开发异步版本,用 37 语法应该会更舒服。
    tabris17
        6
    tabris17  
       2019-08-26 13:35:38 +08:00
    py2 就不要考虑了?
    est
        7
    est  
       2019-08-26 13:37:01 +08:00
    @iPhoneXI 说不定连 tornado 都没有。。。
    julyclyde
        8
    julyclyde  
       2019-08-27 12:36:53 +08:00
    @tabris17 不要考虑了
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1255 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 18:02 · PVG 02:02 · LAX 11:02 · JFK 14:02
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.