cpython
cpython copied to clipboard
The Python programming language
This reduces the total size of unused consts in the top 100 PyPl packages by about 2%: Before: Total: 75 errors; 9,946 files; 235,684 code objects; 3,669,436 lines; 31,309,347 opcodes;...
The compiler currently removes the [trailing unused consts ](https://github.com/python/cpython/blob/main/Python/compile.c#L9736)from code objects. We should remove all unused consts (except the first one, which may be a docstring). * PR: gh-99255
This is ref the discussion on https://github.com/python/cpython/issues/94912 to add an official way of marking callables as coroutine functions where they would not otherwise be detected. cc. @gvanrossum @andrewgodwin I've just...
Closes #99238. * Issue: gh-99238
Not guarding env value in subprocess.py cause python crash when certain env variable is set to None
# Bug report A minimal bug can be found using the following file ```python from subprocess import Popen, PIPE env = {} env["a"] = None process = Popen(['echo', '"hello"'], stdout=PIPE,...
Refs https://github.com/python/cpython/issues/64138 * Issue: gh-97850
PyFrame_GetVar() no longer creates a temporary dictionary to get a variable. * Issue: gh-91248
Issue #99108 is about replacing hashlib primitives (for the non-OpenSSL case) with verified implementations from HACL*. This is the first PR in the series, and focuses specifically on SHA2-256 and...
The Py_CLEAR(), Py_SETREF() and Py_XSETREF() macros now only evaluate their argument once. If the argument has side effects, these side effects are no longer duplicated. Add test_py_clear() and test_py_setref() unit...