Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-132246: Add special buffer methods to C API Type Object docs#132247

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
ambv merged 3 commits intopython:mainfromcmaloney:doc_getbuffer_release
May 21, 2025

Conversation

cmaloney
Copy link
Contributor

@cmaloneycmaloney commentedApr 7, 2025
edited by ZeroIntensity
Loading

Two special methods,__buffer__ and__release_buffer__ were added to Python 3.12 byPEP-688. The C API Type Object documentation for slots includestp_as_buffer, and sub-slotsbf_getbuffer,bf_releasebuffer but does not refer to the Python Data Model version of those. Add the missing references.


📚 Documentation preview 📚:https://cpython-previews--132247.org.readthedocs.build/en/132247/c-api/typeobj.html#quick-reference

Two special methods, __buffer__ and __release_buffer__ were added toPython 3.12 by PEP 688. The C API Type Object documentation for slotsincludes `tp_as_buffer`, and sub-slots `bf_getbuffer`, `bf_releasebuffer`but does not refer to the Python Data Model version of those. Add themissing references.
@ZeroIntensityZeroIntensity added the needs backport to 3.13bugs and security fixes labelApr 21, 2025
Copy link
Member

@ZeroIntensityZeroIntensity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

We could also expand the table so__release_buffer__ fits, but I don't have much of a preference.

@cmaloney
Copy link
ContributorAuthor

I tried a couple times to get my head around emacs table mode to automatedly do that but was unsuccessful, for one char I don't think worth the big diff. I may look at making all entries:meth: / full references, and expand the table a bit with that as an independent project.

ZeroIntensity reacted with thumbs up emoji

@serhiy-storchakaserhiy-storchaka added the needs backport to 3.14bugs and security fixes labelMay 8, 2025
@cmaloney
Copy link
ContributorAuthor

cc:@gpshead

@ambvambv merged commitb529b60 intopython:mainMay 21, 2025
32 checks passed
@github-project-automationgithub-project-automationbot moved this fromTodo toDone inDocs PRsMay 21, 2025
@miss-islington-app
Copy link

Thanks@cmaloney for the PR, and@ambv 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 requestMay 21, 2025
…pythongh-132247)Two special methods, __buffer__ and __release_buffer__ were added toPython 3.12 by PEP 688. The C API Type Object documentation for slotsincludes `tp_as_buffer`, and sub-slots `bf_getbuffer`, `bf_releasebuffer`but does not refer to the Python Data Model version of those. Add themissing references.(cherry picked from commitb529b60)Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestMay 21, 2025
…pythongh-132247)Two special methods, __buffer__ and __release_buffer__ were added toPython 3.12 by PEP 688. The C API Type Object documentation for slotsincludes `tp_as_buffer`, and sub-slots `bf_getbuffer`, `bf_releasebuffer`but does not refer to the Python Data Model version of those. Add themissing references.(cherry picked from commitb529b60)Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
@bedevere-app
Copy link

GH-134426 is a backport of this pull request to the3.14 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.14bugs and security fixes labelMay 21, 2025
@bedevere-app
Copy link

GH-134427 is a backport of this pull request to the3.13 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.13bugs and security fixes labelMay 21, 2025
ambv pushed a commit that referenced this pull requestMay 21, 2025
gh-132247) (gh-134426)Two special methods, __buffer__ and __release_buffer__ were added toPython 3.12 by PEP 688. The C API Type Object documentation for slotsincludes `tp_as_buffer`, and sub-slots `bf_getbuffer`, `bf_releasebuffer`but does not refer to the Python Data Model version of those. Add themissing references.(cherry picked from commitb529b60)Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
ambv pushed a commit that referenced this pull requestMay 21, 2025
gh-132247) (gh-134427)Two special methods, __buffer__ and __release_buffer__ were added toPython 3.12 by PEP 688. The C API Type Object documentation for slotsincludes `tp_as_buffer`, and sub-slots `bf_getbuffer`, `bf_releasebuffer`but does not refer to the Python Data Model version of those. Add themissing references.(cherry picked from commitb529b60)Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@ZeroIntensityZeroIntensityZeroIntensity approved these changes

Assignees
No one assigned
Labels
docsDocumentation in the Doc dirskip newstopic-C-API
Projects
Status: Done
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@cmaloney@ZeroIntensity@ambv@serhiy-storchaka

[8]ページ先頭

©2009-2025 Movatter.jp