MagicStack / MagicStack/uvloop
Can't peek at paused bytes (socket behind TCPTransport unavailable)
未关闭
还没有人认领这个 Issue。
need to fix asyncio
- 主要语言
- Cython
- 星标
- 11.9k
- 派生
- 616
- PR 合并指标
- 30 天内没有已合并 PR
描述
- uvloop version: 0.14.0
- Python version: 3.8.2
- Platform: linux
- Can you reproduce the bug with
PYTHONASYNCIODEBUGin env?: n/a (this is an api thing) - Does uvloop behave differently from vanilla asyncio? How?:
- vanilla asyncio: the underlying socket is available in
transport._sockfor consenting coders aware of the risks using "private" members - uvloop: the underlying socket is not available to python at all (or at least I can't find it via introspection)
- vanilla asyncio: the underlying socket is available in
FWIW, one reason I'm running into this right now is that I have a case where the transport is paused for reading (transport.pause_reading()), but I would still like to peek at the bytes with sock.recv(n, socket.MSG_PEEK).
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先比较 uvloop 的 TCP transport 与 vanilla asyncio 的 transport._sock 行为,重点关注读取暂停时的访问。只有当报告的 MSG_PEEK 用例能够通过 uvloop 以受支持的方式检查暂停中的 socket 字节,并且已根据 issue 的复现细节验证行为时,才算完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- networking
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 35/100