Skip to content

gh-129813: Use PyBytesWriter in _testbuffer - #162297

Merged
vstinner merged 1 commit into
python:mainfrom
vstinner:testbuffer_writer
Nov 19, 2026
Merged

vstinner merged 1 commit into
python:mainfrom
vstinner:testbuffer_writer

Conversation

@vstinner

@vstinner vstinner commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

Avoid a temporary PyMem_Malloc() buffer: create directly a bytes object using PyBytesWriter API.

Avoid a temporary PyMem_Malloc() buffer: create directly a bytes
object using PyBytesWriter API.
@bedevere-app bedevere-app Bot added the type-feature A feature request or enhancement label Nov 19, 2026
@bedevere-app bedevere-app Bot added tests Tests in the Lib/test dir awaiting core review labels Nov 19, 2026
@vstinner

Copy link
Copy Markdown
Member Author

@maurycy: Would you mind to have a look at this change? It's similar to your previous PyBytesWriter changes.

@vstinner vstinner removed the type-feature A feature request or enhancement label Nov 19, 2026

@maurycy maurycy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@vstinner Just LGTM.

@vstinner
vstinner enabled auto-merge (squash) November 19, 2026 22:49
@vstinner
vstinner merged commit 6957e70 into python:main Nov 19, 2026
59 of 64 checks passed
@vstinner
vstinner deleted the testbuffer_writer branch November 19, 2026 23:18
@vstinner

Copy link
Copy Markdown
Member Author

Merged. Thanks for the quick review @maurycy!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants