RustPython
RustPython
Blog
Docs
Changelog
Blog
Docs
Changelog
Overview
Optimizations
Branches
Benchmarks
Runs
Performance History
Latest Results
Convert an `__index__` key before refusing item assignment or deletion (#9516) * Convert an index key before refusing item assignment When a type has a sequence table but no ass_item slot, such as tuple, bytes, str or any heap type, item assignment and deletion raised TypeError without looking at the key. An index key is converted first, so an exception from its __index__ propagates and an int too large for an index raises IndexError. Only then is the operation refused. Do that conversion in set_item() and del_item(). Deletion keeps the "doesn't support" wording for index keys only, and uses "does not support" for any other key. Assisted-by: Claude Code:claude-opus-5-5 * Read the type name after converting the deletion key del_item() held the read guard on a heap type's name while the key's __index__ ran, so an __index__ that assigned the type's __name__ deadlocked a threaded build. Convert the key first and read the name afterwards, which also names the renamed type as CPython does. Keep the snippet's original docstring. Assisted-by: Claude Code:claude-opus-5-5
main
6 hours ago
Synchronize generator yield-from inspection (#9523) Distinguish inspection from execution claims, and restore the whole canonical Python 3.15 free-threaded generator test file through update_lib. Assisted-by: OpenAI Codex:model version unavailable Co-authored-by: Codex <
[email protected]
>
main
6 hours ago
Support max_threads in explicit faulthandler dumps (#9522) Restore canonical Python 3.15 faulthandler tests through update_lib, retaining individual markers for unsupported signal APIs. Assisted-by: OpenAI Codex:model version unavailable Co-authored-by: Codex <
[email protected]
>
main
6 hours ago
Release bytearray storage when resizing to zero (#9521) Match CPython 3.15's nonempty-to-zero resize behavior while preserving same-size and exported-buffer checks. Drop the replaced allocation after releasing the payload guard. Assisted-by: OpenAI Codex:model version unavailable Co-authored-by: Codex <
[email protected]
>
main
6 hours ago
Scope the AGENTS.md test-file allowlist to Lib/test (#9519) Test Code Modification Rules says the only acceptable modifications to "test files" are adding or removing expectedFailure markers. Read literally, that forbids adding a test to an existing extra_tests/snippets file, which the Testing section asks for. Limit that allowlist to the CPython tests in Lib/test and say snippet additions are allowed. The rules against weakening existing tests still apply everywhere. Assisted-by: Claude Code:claude-opus-5-5
main
6 hours ago
Check tee() n before iter() and re-check the iterator (#9518) tee() bound its iterable as an iterator, so iter() ran during argument binding: a negative n was reported only after __iter__ succeeded, and n == 0 still called it. tee() also used an iterator's own __copy__ instead of buffering it, and never called iter() on the iterator it buffered, so an iterator whose __iter__ returns a non-iterator went unnoticed. Check n first and return an empty tuple for zero, then always buffer the iterator in a tee object, which calls iter() on it again. Assisted-by: Claude Code:claude-opus-5-5
main
6 hours ago
Check StringIO newline before initial_value (#9517) StringIO() bound initial_value as str, so a non-str initial_value was rejected during argument binding, before newline was looked at, and with a generic message. An invalid newline must be reported first. Bind initial_value as any object and check its type after newline, with the "initial_value must be str or None" message. Assisted-by: Claude Code:claude-opus-5-5
main
6 hours ago
Accept any index as the operator.length_hint() default (#9515) length_hint() required its default to be an exact int and converted it to usize, so a default with __index__ raised TypeError and a negative default raised ValueError. Bind the default as isize, which goes through __index__, and return it unchanged when the object has no length hint. Assisted-by: Claude Code:claude-opus-5-5
main
6 hours ago
Latest Branches
CodSpeed Performance Gauge
0%
Support max_threads in explicit faulthandler dumps
#9522
10 hours ago
47bebd5
youknowdot:upgrade/faulthandler-explicit-cap-20261101
CodSpeed Performance Gauge
0%
Report a missing argument before converting any
#9513
10 hours ago
8d1f219
jseop-lim:fix/bind-missing-argument
CodSpeed Performance Gauge
0%
Release bytearray storage when resizing to zero
#9521
10 hours ago
89fc098
youknowdot:upgrade/bytearray-resize-zero-20261101
© 2026 CodSpeed Technology
Home
Terms
Privacy
Docs