cpython/Modules/_testlimitedcapi
Victor Stinner 251278d5ee
[3.15] gh-158585: Fix _PyBytes_Resize() if hash value is already computed (#159555)
* gh-158585: Fix _PyBytes_Resize() if hash value is already computed (#158589)

_PyBytes_Resize() now creates a new bytes object if the hash value
was already computed.

bytes_resize_inplace() no longer sets the hash value to -1, since
this function must not be called if the hash value was already
computed.

Add tests on PyUnicode_Resize().

(cherry picked from commit 6e7738bb5e)

* gh-158585: Fix refleak in _testcapi.bytes_resize() (#158806)

(cherry picked from commit 587b7a5b31)
2026-10-16 16:55:09 +00:00
..
clinic [3.15] gh-150285: Fix too long docstrings in Argument Clinic code (GH-150338) (GH-150350) 2026-05-24 22:31:19 +03:00
abstract.c gh-130947: Add again PySequence_Fast() to the limited C API (#130948) 2025-03-13 13:00:57 +01:00
build.c [3.15] gh-158445: Add C API tests on build information functions (#159515) 2026-10-16 11:15:23 +00:00
bytearray.c
bytes.c
capsule.c [3.15] gh-155561: Build most _testlimitedcapi files with Py_TARGET_ABI3T (#155570) (#159144) 2026-10-10 21:06:16 +00:00
codec.c [3.15] gh-155561: Build most _testlimitedcapi files with Py_TARGET_ABI3T (#155570) (#159144) 2026-10-10 21:06:16 +00:00
complex.c gh-116417: Move limited C API complex.c tests to _testlimitedcapi (#117014) 2024-03-19 17:23:12 +01:00
dict.c gh-141510: Test frozendict in test_capi.test_dict (#145084) 2026-02-21 20:07:30 +01:00
eval.c gh-111495: Fix refleaks in test_capi.test_eval tests (#122851) 2024-08-09 09:47:00 +00:00
file.c [3.15] gh-155561: Build most _testlimitedcapi files with Py_TARGET_ABI3T (#155570) (#159144) 2026-10-10 21:06:16 +00:00
float.c gh-116417: Move limited C API unicode.c tests to _testlimitedcapi (#116993) 2024-03-19 12:30:39 +00:00
heaptype_relative.c [3.15] gh-155561: Build most _testlimitedcapi files with Py_TARGET_ABI3T (#155570) (#159144) 2026-10-10 21:06:16 +00:00
import.c [3.15] gh-155561: Build most _testlimitedcapi files with Py_TARGET_ABI3T (#155570) (#159144) 2026-10-10 21:06:16 +00:00
list.c [3.15] gh-155561: Build most _testlimitedcapi files with Py_TARGET_ABI3T (#155570) (#159144) 2026-10-10 21:06:16 +00:00
long.c [3.15] gh-155561: Build most _testlimitedcapi files with Py_TARGET_ABI3T (#155570) (#159144) 2026-10-10 21:06:16 +00:00
object.c [3.15] gh-155561: Build most _testlimitedcapi files with Py_TARGET_ABI3T (#155570) (#159144) 2026-10-10 21:06:16 +00:00
parts.h [3.15] gh-158445: Add C API tests on build information functions (#159515) 2026-10-16 11:15:23 +00:00
pyos.c
run.c [3.15] gh-152132: Test Py_CompileString() in test_capi.test_run (GH-153470) (#153472) 2026-07-10 02:07:38 +00:00
set.c gh-140232: Do not track frozenset objects with immutables (#140234) 2026-01-28 11:27:37 +01:00
slice.c [3.15] gh-158102: Add tests for the slice C API (GH-158120) (GH-158291) 2026-10-09 21:03:23 +03:00
slots.c [3.15] gh-155561: Build most _testlimitedcapi files with Py_TARGET_ABI3T (#155570) (#159144) 2026-10-10 21:06:16 +00:00
sys.c [3.15] gh-155561: Build most _testlimitedcapi files with Py_TARGET_ABI3T (#155570) (#159144) 2026-10-10 21:06:16 +00:00
testcapi_long.h gh-116417: Move limited C API long.c tests to _testlimitedcapi (#117001) 2024-03-19 14:04:23 +00:00
threadstate.c gh-144748: Make PyErr_CheckSignals raise the exception scheduled by PyThreadState_SetAsyncExc (GH-145178) 2026-03-02 11:47:32 +01:00
tuple.c gh-111495: Add tests for PyTuple C API (#118757) 2024-08-26 11:57:52 +02:00
type.c [3.15] gh-155503: Add more PyType C API tests (#155505) (#159085) 2026-10-09 20:33:40 +00:00
unicode.c [3.15] gh-158585: Fix _PyBytes_Resize() if hash value is already computed (#159555) 2026-10-16 16:55:09 +00:00
util.h
vectorcall_limited.c [3.15] gh-155561: Build most _testlimitedcapi files with Py_TARGET_ABI3T (#155570) (#159144) 2026-10-10 21:06:16 +00:00
version.c [3.15] gh-155561: Build most _testlimitedcapi files with Py_TARGET_ABI3T (#155570) (#159144) 2026-10-10 21:06:16 +00:00
weakref.c [3.15] gh-155561: Build most _testlimitedcapi files with Py_TARGET_ABI3T (#155570) (#159144) 2026-10-10 21:06:16 +00:00