MagicStack / MagicStack/uvloop

Missing support for `interleave` and `happy_eyeballs_delay` in `create_connection`

未关闭
#406 6 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

help wanted missing feature
主要语言
Cython
星标
11.9k
派生
616
PR 合并指标
30 天内没有已合并 PR

描述

  • uvloop version: 0.15.2
  • Python version: 3.8.5
  • Platform: Ubuntu 20.04 amd64
  • Can you reproduce the bug with PYTHONASYNCIODEBUG in env?: Not tested.
  • Does uvloop behave differently from vanilla asyncio? How?: Yes, fails if interleave and/or happy_eyeballs_delay is set with create_connection.

asyncio loop.create_connection supports the interleave and happy_eyeballs_delay keyword arguments to enable RFC 8305 "Happy Eyeballs" IPv6-to-IPv4 fallback since Python 3.8. The arguments are documented here: https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.loop.create_connection

The corresponding function in uvloop does not accept these arguments. These would be nice to have because I'm working on a server that proxies requests to external third-party servers which occasionally have a broken IPv6 configuration and traditional connect timeout behavior causes quite a bit of delay.

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

从 uvloop 的 create_connection 入口开始,阅读 issue 中链接的 asyncio loop.create_connection 文档,重点关注 interleave 和 happy_eyeballs_delay。比较受支持的参数和行为,然后验证两个选项都能被接受,并提供文档所述的 IPv6 到 IPv4 回退行为。

由索引模型根据 Issue 内容生成。

评估

技术栈
python
领域
api, networking
Issue 类型
功能
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。