cpython
cpython copied to clipboard
The Python programming language
### What happened? `OrderedDict.copy()` iterates its nodes and calls `__getitem__` to fetch values. A re-entrant `__getitem__` that calls `clear()` during iteration frees all `_ODictNode` structures while `_odict_FOREACH` continues accessing them,...
* Issue: gh-142752
Followup issue for https://github.com/python/cpython/issues/142651 to ensure other APIs are thread safe if they should be ### Linked PRs * gh-142791
### What happened? `get_weak_cache()` assumes that `_weak_cache` is always owned by the object and safe to DECREF. When _weak_cache is a descriptor returning a new object, this assumption breaks, causing...
When creating a ParamSpec with bound=None, the runtime __bound__ attribute is set to instead of None. This change mirrors TypeVar.__new__ by explicitly converting Py_None to NULL before type checking, ensuring...
It doesn't matter whether I spawn Python itself or another utility. I'm not sure if the issue with builbots is the fact that Python is installed as a shared library...
### What happened? In `parse_envlist` the borrowed entries from `PyMapping_Keys` and `PyMapping_Values` are processed by `PyUnicode_FSConverter`, which triggers user `__fspath__` on `PathEntry` objects. The crafted `AliasEnv` drops each entry during...
# Feature or enhancement ### Proposal: ## Motivation We should implement `unique reference tracking` in Tier 2 to facilitate optimizations that reduce reference counting overhead. For example, when a tuple...
Since https://github.com/python/cpython/pull/140800 `BINARY_OP_SUBSCR_STR_INT` only specializes for compact ASCII strings. Let's introduce `BINARY_OP_SUBSCR_USTR_INT` to specialize again for reading an ASCII character from any string. * Issue: gh-139757
This includes changes in 3.12 and 3.13 * Issue: gh-142461