gh-132983: Convert dict_content to take Py_buffer#133924
Conversation
|
It would probably be good to run the refleaks buildbots on this PR before merge. |
Sorry, something went wrong.
|
@AA-Turner would you like to pick this up again? I'm happy to take this over if you don't have time. Want to get the last of the zstd items done before b2. |
Sorry, something went wrong.
|
🤖 New build scheduled with the buildbot fleet by @AA-Turner for commit fe3fb49 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F133924%2Fmerge If you want to schedule another build, you need to add the 🔨 test-with-refleak-buildbots label again. |
Sorry, something went wrong.
|
Merged main because there were nonsense errors in the tests. |
Sorry, something went wrong.
90cef43 to
30ac9d5
Compare
May 26, 2025 07:55
|
🤖 New build scheduled with the buildbot fleet by @AA-Turner for commit 30ac9d5 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F133924%2Fmerge If you want to schedule another build, you need to add the 🔨 test-with-refleak-buildbots label again. |
Sorry, something went wrong.
|
Apologies for the force-push, my local git state got messy. |
Sorry, something went wrong.
serhiy-storchaka
left a comment
There was a problem hiding this comment.
There is no principal difference between keeping binary data as a bytes object or a raw memory buffer. But if the latter looks better to you, LGTM.
Sorry, something went wrong.
f2ce4bb
into
python:main
May 26, 2025
|
Thanks @AA-Turner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14. |
Sorry, something went wrong.
…()`` (pythonGH-133924) (cherry picked from commit f2ce4bb) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
ZstdDict'sdict_contentis just binary data, we don't need to allocate an entire PyBytesObject for it. This also lets us use thePy_bufferargument clinic converter.We replace the
dict_contentmember ofZstdDictwithdict_bufferanddict_len.ZstdDict.dict_contentis still exposed as a bytes object to Python via a new getter.A
cc @Rogdham