asyncio: ` IocpProactor.recvfrom_into() ` misnames its receive-size parameter as ` flags`
Open
Nobody has claimed this yet.
OS-windows
stdlib
topic-asyncio
type-bug
- Dominant language
- Python
- Stars
- 77.2k
- Forks
- 35.9k
- PR merge metrics
- PR metrics pending
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating IocpProactor.recvfrom_into() and comparing its third parameter with _overlapped.Overlapped.WSARecvFromInto(). Review linked PR gh-157422, then verify that the parameter naming and receive-size usage are consistent without changing the flags argument.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 30/100