asyncio: ` IocpProactor.recvfrom_into() ` misnames its receive-size parameter as ` flags`
未關閉
還沒有人認領這個 Issue。
OS-windows
stdlib
topic-asyncio
type-bug
- 主要語言
- Python
- 星號
- 77.2k
- 分支
- 36k
- PR 合併指標
- PR 指標待擷取
描述
Bug report
Bug description:
On Windows, IocpProactor.recvfrom_into() defines its third parameter as flags:
def recvfrom_into(self, conn, buf, flags=0):
...
ov.WSARecvFromInto(conn.fileno(), buf, flags)
However, _overlapped.Overlapped.WSARecvFromInto() expects:
(handle, buf, size, flags=0)
so the value named flags is actually passed as size and used as the receive length (nbytes). The parameter is therefore misnamed and inconsistent with the surrounding APIs.
CPython versions tested on:
CPython main branch
Operating systems tested on:
No response
Linked PRs
- gh-157422
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
首先定位 IocpProactor.recvfrom_into() 並將其第三個參數與 _overlapped.Overlapped.WSARecvFromInto() 進行比較。接著檢視關聯的 PR gh-157422,然後驗證參數命名和接收大小的使用是否一致,但不要變更 flags 引數。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- python
- 領域
- networking
- Issue 類型
- 缺陷
- 難度
- 1/5
- 預估耗時
- 1 小時以內
- 活躍度
- 停滯
- 描述清晰度
- 描述清楚
- 新手友好度
- 30/100