Skip to content

Conversation

mdavis-xyz
Copy link
Contributor

@mdavis-xyz mdavis-xyz commented Nov 8, 2024

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.

Note: I did not raise an issue for this, because it is so trivial.


📚 Documentation preview 📚: https://cpython-previews--126603.org.readthedocs.build/

@mdavis-xyz mdavis-xyz requested a review from gpshead as a code owner November 8, 2024 21:11
@bedevere-app bedevere-app bot added docs Documentation in the Doc dir skip news awaiting review labels Nov 8, 2024
@mdavis-xyz mdavis-xyz changed the title Doc: Fix buf argument name in multiprocessing connection send/recv_bytes Doc: Fix buf argument name in multiprocessing connection send_bytes recv_bytes_into Nov 8, 2024
@mdavis-xyz
Copy link
Contributor Author

Please add the “skip issue” label to this PR.

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

Labels

awaiting review docs Documentation in the Doc dir skip news

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant