python / python/cpython

asyncio: ` IocpProactor.recvfrom_into() ` misnames its receive-size parameter as ` flags`

オープン
#157,418 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

OS-windows stdlib topic-asyncio type-bug
主要言語
Python
スター
77.2k
フォーク
35.9k
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

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず IocpProactor.recvfrom_into() を見つけ、その第 3 パラメーターを _overlapped.Overlapped.WSARecvFromInto() と比較します。次に、関連付けられた PR gh-157422 を確認し、flags 引数を変更せずに、パラメーター名と受信サイズの使用方法に一貫性があることを検証します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
networking
issue の種類
バグ
難易度
1/5
見積もり時間
1時間未満
活発さ
停滞
明瞭さ
明確に書かれている
初心者へのやさしさ
30/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。