Skip to content

gh-148763: Fix paramter name in multiprocessing.connection.send_bytes/recv_bytes_into docs#126603

Merged
gpshead merged 2 commits intopython:mainfrom
mdavis-xyz:connection_buf_buffer
Apr 20, 2026
Merged

gh-148763: Fix paramter name in multiprocessing.connection.send_bytes/recv_bytes_into docs#126603
gpshead merged 2 commits intopython:mainfrom
mdavis-xyz:connection_buf_buffer

Conversation

@mdavis-xyz
Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

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

@github-actions
Copy link
Copy Markdown

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale Stale PR or inactive for long period of time. label Apr 19, 2026
@python-cla-bot
Copy link
Copy Markdown

python-cla-bot bot commented Apr 19, 2026

All commit authors signed the Contributor License Agreement.

CLA signed

@mdavis-xyz
Copy link
Copy Markdown
Contributor Author

This PR was stale for a while. I think it was because I hadn't signed the CLA. I have now.

The CI complains that there's no issue. I raised an issue, but the CI hasn't noticed that change. I don't know how to re-run the CI. The steps here describe a button which I cannot find on this page.

Please re-run the CI for me, and then review and merge.

@StanFromIreland StanFromIreland changed the title Doc: Fix buf argument name in multiprocessing connection send_bytes recv_bytes_into gh-148763: Fix paramter name in multiprocessing.connection.send_bytes/recv_bytes_into docs Apr 19, 2026
@gpshead gpshead added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes labels Apr 20, 2026
@gpshead gpshead merged commit e50acef into python:main Apr 20, 2026
42 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in Docs PRs Apr 20, 2026
@miss-islington-app
Copy link
Copy Markdown

Thanks @mdavis-xyz for the PR, and @gpshead for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Apr 20, 2026
…d_bytes/recv_bytes_into` docs (pythonGH-126603)

(cherry picked from commit e50acef0b2c2057874a9eec98c37ca6cf8ee98e1)

Co-authored-by: Matthew Davis <7035647+mdavis-xyz@users.noreply.github.com>
Doc: Fix buf argument name in multiprocessing connection send_bytes
@bedevere-app
Copy link
Copy Markdown

bedevere-app bot commented Apr 20, 2026

GH-148786 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.14 bugs and security fixes label Apr 20, 2026
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Apr 20, 2026
…d_bytes/recv_bytes_into` docs (pythonGH-126603)

(cherry picked from commit e50acef)

Co-authored-by: Matthew Davis <7035647+mdavis-xyz@users.noreply.github.com>
Doc: Fix buf argument name in multiprocessing connection send_bytes
@bedevere-app
Copy link
Copy Markdown

bedevere-app bot commented Apr 20, 2026

GH-148787 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Apr 20, 2026
gpshead pushed a commit that referenced this pull request Apr 20, 2026
…nd_bytes/recv_bytes_into` docs (GH-126603) (#148786)

gh-148763: Fix paramter name in `multiprocessing.connection.send_bytes/recv_bytes_into` docs (GH-126603)
(cherry picked from commit e50acef)


Doc: Fix buf argument name in multiprocessing connection send_bytes

Co-authored-by: Matthew Davis <7035647+mdavis-xyz@users.noreply.github.com>
gpshead pushed a commit that referenced this pull request Apr 20, 2026
…nd_bytes/recv_bytes_into` docs (GH-126603) (#148787)

gh-148763: Fix paramter name in `multiprocessing.connection.send_bytes/recv_bytes_into` docs (GH-126603)
(cherry picked from commit e50acef)


Doc: Fix buf argument name in multiprocessing connection send_bytes

Co-authored-by: Matthew Davis <7035647+mdavis-xyz@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir skip news stale Stale PR or inactive for long period of time.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants