gh-139871: Add bytearray.take_bytes([n]) to efficiently extract bytes#140128
Merged
encukou merged 46 commits intopython:mainpython/cpython:mainfrom Nov 13, 2025
Merged
gh-139871: Add bytearray.take_bytes([n]) to efficiently extract bytes#140128encukou merged 46 commits intopython:mainpython/cpython:mainfrom
bytearray.take_bytes([n]) to efficiently extract bytes#140128encukou merged 46 commits intopython:mainpython/cpython:mainfrom
Commits
Commits on Oct 14, 2025
gh-139871: Update bytearray to contain PyBytesObject
Show description for daf8e02committed- authored
Commits on Oct 15, 2025
- committed
- committed
Update Objects/bytearrayobject.c
Show description for e9f5ca9andauthored- committed
- authored
Commits on Oct 17, 2025
Update Objects/bytearrayobject.c
Show description for 451c302andauthored
Commits on Oct 18, 2025
- committed
- committed
review fix: handle NULL return from from PyBytes_FromStringAndSize
Show description for 20175f8andcommitted- committed
- committed
- committed
- committed
Commits on Oct 27, 2025
Apply suggestion from @vstinner
Show description for 9887dadandauthoredDon't multiply by sizeof(char) as it's always 1
Show description for 6e4b910committedRely on bytes for end of buffer NULL
Show description for b6f8403committed- committed
- committed
- committed
Commits on Oct 29, 2025
- committed
- committed
- committed
- committed
- committed
Apply suggestion from @vstinner
Show description for 97be818andauthoredRemove _PyByteArray_empty_string, add bytearray_reinit_from_bytes
Show description for 99e49efauthored- committed
- committed
- committed
Commits on Oct 30, 2025
Apply suggestion from @encukou
Show description for 313e78candauthored- committed
- committed
Add take_bytes_n free-threading test
Show description for 2a95118committed
Commits on Oct 31, 2025
Commits on Nov 4, 2025
- committed
- committed
- committed
Commits on Nov 7, 2025
Add +1 so allocation is over max byte length
Show description for 9681135committed- committed
Apply suggestions from code review
Show description for ee0d6d6andauthored