FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-129813, PEP 782: Use PyBytesWriter in bufferedio.c by vstinner · Pull Request #139121 · python/cpython · GitHub

Repository navigation

gh-129813, PEP 782: Use PyBytesWriter in bufferedio.c - #139121

Merged
vstinner merged 1 commit into
python:mainfrom
vstinner:pybyteswriter_buffered_read
Sep 18, 2025
Merged

vstinner merged 1 commit into
python:mainfrom
vstinner:pybyteswriter_buffered_read

Conversation

vstinner commented Sep 18, 2025 •
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Member

Replace PyBytes_FromStringAndSize(NULL, size) and _PyBytes_Resize() with the new public PyBytesWriter API.

Replace PyBytes_FromStringAndSize(NULL, size) and _PyBytes_Resize()
with the new public PyBytesWriter API.

vstinner commented Sep 18, 2025 •
edited
Loading

Copy link
Copy Markdown
Member Author

cc @cmaloney

Sadly, it's hard to write a benchmark for this C function (_bufferedreader_read_generic()), since the io module reads more data than requested and then cache it. Following file.read() calls will call _bufferedreader_read_fast() instead.

vstinner merged commit 9b35f7c into python:main Sep 18, 2025
47 checks passed
vstinner deleted the pybyteswriter_buffered_read branch September 18, 2025 15:00
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL