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