cpython
cpython copied to clipboard
The Python programming language
## Before: ```python from functools import reduce from operator import sub >>> reduce(sub, [1, 1, 2, 3, 5, 8], 21) 1 >>> reduce(sub, [1, 1, 2, 3, 5, 8], initial=21)...
# Crash report ### What happened? In `Modules/_asynciomodule.c` the `_asyncio_Future_remove_done_callback_impl` function has a section where it retrieves an item from a list and then immediately assumes it's a tuple without...
Resolve #125887 * Issue: gh-125887 ---- 📚 Documentation preview 📚: https://cpython-previews--125907.org.readthedocs.build/
Adds: * `RETURN_VALUE_FUNC` * `RETURN_VALUE_GEN` * `INSTRUMENTED_RETURN_VALUE_FUNC` * `INSTRUMENTED_RETURN_VALUE_GEN` * `LOAD_CONST_IMMORTAL` Removes: * `RETURN_VALUE` * `RETURN_CONST` * `INSTRUMENTED_RETURN_VALUE` * `INSTRUMENTED_RETURN_CONST` * Issue: gh-125837
On Windows, `long` is a signed 32-bit integer so it can't represent `0xffff_ffff` without overflow. Windows exit codes are unsigned 32-bit integers, so if a child process exits with `-1`,...
# Bug report ### Bug description: The [documentation](https://docs.python.org/3/library/bisect.html) for [bisect.bisect_right](https://docs.python.org/3/library/bisect.html#bisect.bisect_right) and [bisect.bisect_left]( https://docs.python.org/3/library/bisect.html#bisect.bisect_left) states in both cases that >The returned insertion point ip partitions the array a into two slices...
I would like to backport this to 3.12 and 3.13 as well. * Issue: gh-125783
* Issue: gh-125420
This PR adds a guard against `SyntaxError.lineno` being `None` in `code.InteractiveInterpreter._showtraceback`, which should avoid `PyREPL` exiting the interpreter when a null byte is present in the input. Not sure both...
The `STORE_ATTR_INSTANCE_VALUE` opcode doesn't support objects with non-NULL managed dictionaries, so don't specialize to that op in that case. * Issue: gh-125610