Skip to content

wrong arg name in multiprocessing connection send_bytes recv_bytes_into: buf vs buffer #148763

@mdavis-xyz

Description

@mdavis-xyz

Documentation

The documentation for multiprocessing.connection.Connection.send_bytes says that the first argument is called buffer.

send_bytes(buffer[, offset[, size]])

When I run:

from multiprocessing import Pipe

c1, c2 = Pipe(duplex=True)

c1.send_bytes(buffer=b'123')

(On python 3.13)

TypeError: _ConnectionBase.send_bytes() got an unexpected keyword argument 'buffer'

In connection.py the argument is defined as buf not buffer.

def send_bytes(self, buf, offset=0, size=None):

Indeed when I instead write c1.send_bytes(buf=b'123'), it runs without throwing an exception.

The same is true of recv_bytes_into.

I wrote a fix in #126603. The CI complains because the PR has no issue. So here is the issue. (Hopefully the CI bot detects that I'm raising this issue, and unblocks the PR.)

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dir

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions