We were unable to construct the commit group for this pull request: None of the pull request's commits have been successfully processed as yet.

gh-157242: Add byteswriter_check_consistency() #157723

Merged
vstinner opened 8:33pm on September 17, 2026 wanted to merge 194 Ξ” into python/cpython main from
bytes_mutate

Pull Request Overview

  • Opened on September 18, 2026
  • Status Merged
  • Commit count 1 with first commit September 18, 2026

Total Delta

194 Total Diff Delta

Open Days

Open 0 weekdays

Test Delta

42 Diff Delta in Test Files
Breakdown by Phase

How long has this pull request spent in each phase of its lifecycle?

Fraction of total time Business days Phase
 
0.0 days Authoring 0 commits before pull request opened for review
 
0.0 days Awaiting first review
 
1.0 day Merge to deploy (still awaiting deployment)

Total time for pull request 0.0 business days from first commit authored to merge
Still awaiting deployment

Author avatar

gh-157242: Add byteswriter_check_consistency()

Add byteswriter_check_consistency() to check that the bytes/bytearray object can be mutated. It is called by all PyBytesWriter functions.


  • Add test_thread to PyBytesWriter tests.

  • _PyBytes_IsMutable() now checks _PyObject_IsUniquelyReferenced().


  • Issue: gh-157242
    <!-- /gh-issue-number -->

Comments Threads Pending Resolution

Resolved Comment Threads

No resolved comments have been left on this PR.