Skip to content

gh-126980: Fix bytearray.__buffer__ crash on PyBUF_{READ,WRITE} #126981

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 19, 2024

Conversation

sobolevn
Copy link
Member

@sobolevn sobolevn commented Nov 18, 2024

Related #114802

@JelleZijlstra, since you are __buffer__ PEP author, could you please take a look? :)

@JelleZijlstra
Copy link
Member

@JelleZijlstra, since you are __buffer__ PEP author, could you please take a look? :)

I don't think I wrote bytearray_getbuffer; the buffer protocol predates my PEP. This change looks good to me though, thanks!

Co-authored-by: Victor Stinner <[email protected]>
@sobolevn sobolevn added the needs backport to 3.13 bugs and security fixes label Nov 19, 2024
@sobolevn
Copy link
Member Author

@sobolevn sobolevn merged commit 3932e1d into python:main Nov 19, 2024
45 checks passed
@miss-islington-app
Copy link

Thanks @sobolevn for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

@miss-islington-app
Copy link

Sorry, @sobolevn, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 3932e1db5353bbcf3e3c1133cc9d2cde654cb645 3.13

@sobolevn
Copy link
Member Author

Will do a manual one.

sobolevn added a commit to sobolevn/cpython that referenced this pull request Nov 19, 2024
…EAD,WRITE}` (pythonGH-126981)

(cherry picked from commit 3932e1d)

Co-authored-by: sobolevn <[email protected]>
Co-authored-by: Victor Stinner <[email protected]>
sobolevn added a commit to sobolevn/cpython that referenced this pull request Nov 19, 2024
…EAD,WRITE}` (pythonGH-126981)

(cherry picked from commit 3932e1d)

Co-authored-by: sobolevn <[email protected]>
Co-authored-by: Victor Stinner <[email protected]>
@bedevere-app
Copy link

bedevere-app bot commented Nov 19, 2024

GH-127023 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 Nov 19, 2024
sobolevn added a commit that referenced this pull request Nov 19, 2024
…ITE}` (GH-126981) (#127023)

(cherry picked from commit 3932e1d)

Co-authored-by: Victor Stinner <[email protected]>
ebonnal pushed a commit to ebonnal/cpython that referenced this pull request Jan 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants