GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — bpo-45459: Add Py_buffer to limited API by tiran · Pull Request #29991 · python/cpython

Conversation

@tiran

@tiran tiran commented Dec 8, 2021 •
edited by miss-islington
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member
  • Py_buffer struct
  • PyBuffer_*() API functions
  • PyBUF_* constants
  • Py_bf_getbuffer and Py_bf_releasebuffer type slots
  • PyMemoryView_FromBuffer() API
  • tests for limited API
  • make regen-limited-abi
  • documentation update
  • export PyPickleBuffer*() API ???

https://bugs.python.org/issue45459

Automerge-Triggered-By: GH:encukou

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@tiran
tiran requested a review from encukou December 8, 2021 14:12
@the-knights-who-say-ni the-knights-who-say-ni added the CLA signed label Dec 8, 2021
@bedevere-bot bedevere-bot added the awaiting core review label Dec 8, 2021
@tiran tiran mentioned this pull request Dec 8, 2021
bpo-45459: Add Py_buffer to limited API #29035
Closed
3 tasks
@tiran
tiran marked this pull request as ready for review December 8, 2021 18:15
@tiran
tiran requested a review from a team as a code owner December 8, 2021 18:15
@github-actions

github-actions Bot commented Jan 8, 2022

Copy link
Copy Markdown

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot added the stale Stale PR or inactive for long period of time. label Jan 8, 2022
@tiran
tiran force-pushed the bpo-45459-bufapi-struct branch 2 times, most recently from a990f73 to 200d441 Compare January 13, 2022 10:40
@tiran tiran removed the stale Stale PR or inactive for long period of time. label Jan 21, 2022
@tiran
tiran force-pushed the bpo-45459-bufapi-struct branch 2 times, most recently from 1c41c9d to ef19458 Compare January 24, 2022 08:00
@tiran

tiran commented Jan 28, 2022

Copy link
Copy Markdown
Member Author

@encukou could you take a look, please?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@encukou

encukou commented Jan 31, 2022

Copy link
Copy Markdown
Member

I'll get to it this week.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

encukou
encukou reviewed Feb 2, 2022
View reviewed changes
Comment thread Doc/data/stable_abi.dat Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Include/buffer.h Outdated

@encukou encukou Feb 2, 2022

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Can we leave out the bufferinfo tag? Anonymous structs are well-supported nowadays, and only Py_buffer should be public.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@tiran tiran Feb 2, 2022

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Good idea!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Include/cpython/object.h Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Modules/xxlimited.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Modules/xxlimited.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

tiran added 12 commits February 2, 2022 13:28
@tiran
bpo-45459: Add Py_buffer to limited API
549fcdb
@tiran
Move Py_buffer APIs to buffer.h
526c58c
@tiran
Hide typo alias with limited API
1440b94
@tiran
Make Py_buffer public
cf98a23
@tiran
Update stable_abi.txt and run make regen-limited-abi
0e67e2c
@tiran
Add simple tests for Py_buffer stable ABI
d516781
@tiran
Add PyMemoryView_FromBuffer to limited API
c1391cf
@tiran
Add docs
92d2ea5
@tiran
Document PyObject_CopyData
7df9317
@tiran
Address Petr's code review of xxlimited.c
0ab2a44
@tiran
Make Py_Buffer struct anon
98a4ee5
@tiran
Remove forward declaration of Py_Buffer
6119c2b
@tiran
tiran force-pushed the bpo-45459-bufapi-struct branch from ef19458 to 6119c2b Compare February 2, 2022 13:21
@tiran
tiran requested a review from encukou February 2, 2022 14:40
encukou
encukou approved these changes Feb 2, 2022
View reviewed changes

@encukou encukou left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Looks good, let's get it in! Thanks!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-bot bedevere-bot added awaiting merge and removed awaiting core review labels Feb 2, 2022
@encukou encukou added the 🤖 automerge label Feb 2, 2022
@miss-islington
miss-islington merged commit f66c857 into python:main Feb 2, 2022
@bedevere-bot bedevere-bot removed the awaiting merge label Feb 2, 2022
@davidhewitt davidhewitt mentioned this pull request Feb 6, 2022
gh-98410: move getbufferproc and releasebufferproc to buffer.h #31158
Merged
@domdfcoding domdfcoding mentioned this pull request Feb 7, 2022
Unable to compile on Python 3.11 alpha 5 hpyproject/hpy#288
Closed
@rdb

rdb commented Feb 7, 2022

Copy link
Copy Markdown

This change broke our project build because when cpython/object.h is including buffer.h it is forcing it to resolve along the search path, and the compiler is hitting the buffer.h in our project rather than the one in the Python include directory.

Should it not be using a relative include, ie. #include "../buffer.h" ? I think otherwise this change will cause breakage for many projects given how common the header name "buffer.h" may be.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tiran

tiran commented Feb 7, 2022

Copy link
Copy Markdown
Member Author

This PR is merged and closed. Please discuss this issue on the Python bug tracker.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@python python locked as resolved and limited conversation to collaborators Feb 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

@encukou encukou encukou approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

6 participants

@tiran @encukou @rdb @the-knights-who-say-ni @bedevere-bot @miss-islington
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.