Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

Description

@lpyu001

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytopic-asynciotype-bugAn unexpected behavior, bug, or error

    Projects

    • Status
      Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions