pipes from subprocess_exec do not have extra info 'pipe' (incompatible with vanilla asyncio)
還沒有人認領這個 Issue。
評估
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 新手友好度
- 45/100
- Issue 類型
- 缺陷
- 描述清晰度
- 基本清楚
- 活躍度
- 停滯
- 技術堆疊
- python
- 領域
- backend, networking
研究方向
從 UVProcessTransport 程式碼中建立子程序管道的 WriteUnixTransport 的位置開始,並將其與會加入管道額外資訊的 loop.create_write_pipe() 進行比較。驗證 get_pipe_transport() 傳回的子程序 stdin transport 是否透過 get_extra_info('pipe') 公開底層管道,使其行為與 vanilla asyncio 一致。
由索引模型根據 Issue 內容生成。
描述
-
uvloop version:
0.19.0 -
Python version:
3.10.12 -
Platform:
linux -
Can you reproduce the bug with
PYTHONASYNCIODEBUGin env?:
yes -
Does uvloop behave differently from vanilla asyncio? How?:
Yes, this is the point of this issue report. So after you get your process transport from subprocess_exec(...) you then can use get_pipe_transport() to access the transport associated with stdin. With vanilla asyncio you can then call get_extra_info('pipe') on that transport to access the pipe directly. With uvloop get_extra_info('pipe') on the same transport returns None.
I can see in the source that when a pipe transport is created via loop.create_write_pipe(...) we have:
transp = WriteUnixTransport.new(self, proto, None, waiter)
transp._add_extra_info('pipe', pipe)
However no transp._add_extra_info(...) is done on the WriteUnixTransport that is created inside the UVProcessTransport code. There are ways to work around this (don't depend on getting access to that pipe) however this works fine in the asyncio loop implementation. I imagine it can be done without too much pain by wrapping the raw file descriptor created in the process transport code however I'm not super fluent in cython so I didn't attempt a patch.
- 主要語言
- Cython
- 星號
- 11.9k
- 分支
- 615
- PR 合併指標
- 30 天內沒有已合併 PR
貢獻指南
這個儲存庫沒有索引到貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
MagicStack/uvloop 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 68/100
MagicStack/uvloop#759 ·
-
難度 2/5 1-3 小時 新手友好度 68/100
MagicStack/uvloop#741 · 2 個 reaction ·
-
難度 2/5 1-3 小時 新手友好度 68/100
MagicStack/uvloop#702 · 8 則留言 · 9 個 reaction ·
-
難度 4/5 3-5 天 新手友好度 25/100
MagicStack/uvloop#766 ·
-
難度 4/5 3-5 天 新手友好度 52/100
MagicStack/uvloop#765 ·
查看 MagicStack/uvloop 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 75/100
mksglu/context-mode#1200 ·
-
難度 2/5 1-3 小時 新手友好度 75/100
-
難度 2/5 1-3 小時 新手友好度 70/100
-
clawsweeper:needs-maintainer-review clawsweeper:needs-product-decision clawsweeper:no-new-fix-pr impact:auth-provider issue-rating: 🌊 off-meta tidepool P2
難度 1/5 1 小時以內 新手友好度 80/100
-
難度 2/5 1-3 小時 新手友好度 75/100