cpython
cpython copied to clipboard
The Python programming language
A random find from my side, I was going through this code when I noticed some unnecessary conversions happening. Nice performance improvement basically for free (numbers from my M1 Pro...
This PR handles an edge-case when suggesting module imports in PyREPL (see [this comment](https://github.com/python/cpython/pull/138268#issuecomment-3240137336)): If a module is already imported, the import machinery will only get submodules from it, even...
# Feature or enhancement ### Proposal: In Cython we've historically let people do things like: ```cython cdef class C: cdef int non_object_attribute def f(C c): with nogil: value = c.non_object_attribute...
Follow-up to #142469 Add pixi infrastructure for - `free-threading`: compiles with `--disable-gil` - `tsan-free-threading`: compiles with `--disable-gil --with-thread-sanitizer` --- Currently, `free-threading` seems to work well on Linux. `tsan` crashes on...
# Crash report ### What happened? It's possible to cause an abort in a patched debug JIT build by running the following MRE. The necessary patch: ```diff diff --git a/Include/internal/pycore_backoff.h...
The `handle` parameter was being ignored in the POSIX implementation of `CDLL._load_library()`, causing it to always call `_dlopen()` even when a valid handle was provided. This was a regression introduced...
the original code precomputed nblocks at the beginning of the function, but when a reentrant writer cleared the array during the first callback, self->ob_item became NULL. The loop continued iterating...
# Feature or enhancement ### Proposal: Soon enough, MSVC's clang-cl will be new enough to support tail calling. Xcode clang already supports tail calling. We should thus remove the chocolatey/brew...
* Issue: gh-131323 ---- 📚 Documentation preview 📚: https://cpython-previews--137972.org.readthedocs.build/
This PR covers the iteration of generators in the JIT optimizer. Benchmark results: 1.5% faster on AArch64 macOS https://github.com/facebookexperimental/free-threading-benchmarking/blob/main/results/bm-20260102-3.15.0a3%2B-8f7b4f4-JIT/bm-20260102-macm4pro-arm64-Fidget%252dSpinner-cover_more_frames-3.15.0a3%2B-8f7b4f4-vs-base.md 0% faster on x86-64 Linux. https://github.com/facebookexperimental/free-threading-benchmarking/blob/main/results/bm-20260102-3.15.0a3%2B-8f7b4f4-JIT/bm-20260102-vultr-x86_64-Fidget%252dSpinner-cover_more_frames-3.15.0a3%2B-8f7b4f4-vs-base.md I think the macOS results...