Title: Add `__buffer__` and `__release_buffer__` methods to builtin types · Issue #5179 · RustPython/RustPython · GitHub
Open Graph Title: Add `__buffer__` and `__release_buffer__` methods to builtin types · Issue #5179 · RustPython/RustPython
X Title: Add `__buffer__` and `__release_buffer__` methods to builtin types · Issue #5179 · RustPython/RustPython
Description: Feature The buffer protocol is mostly intended to provide provide a C API to access the underlying buffers of data structures like bytes, array, and memoryview. In Python 3.12 two new methods, __buffer__ and __release_buffer__, were adde...
Open Graph Description: Feature The buffer protocol is mostly intended to provide provide a C API to access the underlying buffers of data structures like bytes, array, and memoryview. In Python 3.12 two new methods, __bu...
X Description: Feature The buffer protocol is mostly intended to provide provide a C API to access the underlying buffers of data structures like bytes, array, and memoryview. In Python 3.12 two new methods, __bu...
Opengraph URL: https://github.com/RustPython/RustPython/issues/5179
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Add `__buffer__` and `__release_buffer__` methods to builtin types","articleBody":"## Feature\r\n\r\nThe buffer protocol is mostly intended to provide provide a C API to access the underlying buffers of data structures like `bytes`, `array`, and `memoryview`. In Python 3.12 two new methods, `__buffer__` and `__release_buffer__`, were added to allow subclasses and custom classes to interface with the C API.\r\n\r\nAs far as I can tell RustPython does not support the C API, but the appropriate builtin types should still have these slots defined.\r\n\r\n## Python Documentation or reference to CPython source code\r\n\r\nhttps://docs.python.org/3.12/reference/datamodel.html#emulating-buffer-types\r\nhttps://peps.python.org/pep-0688/","author":{"url":"https://github.com/dchiquito","@type":"Person","name":"dchiquito"},"datePublished":"2024-02-24T16:15:04Z","url":"https://github.com/RustPython/RustPython/issues/5179"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:7959d723-ebd1-34e1-0ce0-079b995685b1 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C578:33DDEF:1FCF342:2B881C2:6B002727 |
| html-safe-nonce | b7c46d0664ce3d57fe1a8a06a9e2524ff60b9efa24f970dad781e09bc1cf6669 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNTc4OjMzRERFRjoxRkNGMzQyOjJCODgxQzI6NkIwMDI3MjciLCJ2aXNpdG9yX2lkIjoiMTc5MDczNjM5MDUxNDgxMjcxMSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 68e1d9501298e87b688e5b0d8bed27d77fd68525e1939b50b42dc2851d7f2cd1 |
| hovercard-subject-tag | issue:2152381862 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/RustPython/RustPython/5179/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9eeac0a3a228cc18c080388d175d6507af770f3582095fd980dd2669fd5966b6/RustPython/RustPython/issues/5179 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9eeac0a3a228cc18c080388d175d6507af770f3582095fd980dd2669fd5966b6/RustPython/RustPython/issues/5179 |
| og:image:alt | Feature The buffer protocol is mostly intended to provide provide a C API to access the underlying buffers of data structures like bytes, array, and memoryview. In Python 3.12 two new methods, __bu... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dchiquito |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4eb4cba0d69f045374ac15de9666d22b0961e1d555cc3824f36b7734c00c78e0 |
| turbo-cache-control | no-preview |
| go-import | github.com/RustPython/RustPython git https://github.com/RustPython/RustPython.git |
| octolytics-dimension-user_id | 39710557 |
| octolytics-dimension-user_login | RustPython |
| octolytics-dimension-repository_id | 135201145 |
| octolytics-dimension-repository_nwo | RustPython/RustPython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 135201145 |
| octolytics-dimension-repository_network_root_nwo | RustPython/RustPython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 44c658b24abf00491fb7ae5f56d42c9f38cbeab2 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width