cpython
cpython copied to clipboard
The Python programming language
Fixes #142448 Sorry, there is no test as I can't produce something that is self-isolated. Furthermore, it seems this test only works with exceptions + monitoring, which is exceptionally hard...
When _weak_cache is a descriptor that creates a new object each time it's accessed, get_weak_cache() incorrectly assumed it could return a borrowed reference and immediately decremented the reference count. This...
### What happened? A crafted mapping returns a list from `items` and a key encoder clears that list mid iteration, yet `_encoder_iterate_mapping_lock_held` continues to read entries for `encoder_encode_key_value`, so `_json`...
This is a reopen PR from #141618 the reason is that I deleted my fork by accident and all my on going PR gone. this is an approved one, really...
# Crash report ### What happened? Please see title. ### CPython versions tested on: CPython main branch ### Operating systems tested on: _No response_ ### Output from running 'python -VV'...
This PR gives the JIT free-threading support. It is only on for single-threaded code, and turns off automatically on multi-threaded code. All JIT features are turned on, including the optimizer....
With LLVM >= 21.1.0 BOLT can handle computed gotos in PIC compiled code. However in some cases computed gotos still produce issues. This PR handles it this way: For either...
* Issue: gh-142419 ---- 📚 Documentation preview 📚: https://cpython-previews--142480.org.readthedocs.build/
* Issue: gh-134584