#cPython

2026-02-02

CPython — Сборка мусора изнутри, ч.4

Пришло время поговорить о главной функции сборщика мусора в CPython . В предыдущих частях ( 1 , 2 , 3 ) мы говорили о поколениях, инкрементальной и полной сборке мусора — но все они в итоге вызывают главную функцию, которая и реализует основной алгоритм циклического сборщика мусора — находит и разрывает циклы у объектов, которые уже вышли из использования. В первой статье на тему устройства сборщика мусора я написал, что история началась, когда я попробовал исправить ошибку в CPython . И вот, в четвёртой статье, я наконец‑то добрался до функции, в которой была ошибка. Если вам интересно, давайте посмотрим, как работает «сердце» сборщика мусора.

habr.com/ru/articles/992026/

#gc #garbage_collector #python #cpython #reference_counting

2026-02-01

une documentation bas niveau par zpoint expliquant l'implémentation officielle de l'interpréteur cPython mis à disposition par @ThePSF : zpoint.github.io/CPython-Inter

Le repository hébergeant la documentation : github.com/zpoint/CPython-Inte

#Python #cPython #tutoriel

2026-01-20

CPython — Сборка мусора изнутри, ч.3

В прошлых частях мы поговорили о том, как происходит регистрация объектов в сборщике мусора, о том как происходит планирование и вызов сборки мусора, что такое молодое поколение и как устроена для него сборка мусора. В этой части пришло время поговорить об инкрементальной сборке мусора - главному нововведению версии 3.14 в части сборки мусора. Поговорим, как она устроена, какие даёт преимущества и какие имеет недостатки, а также затронем полную сборку мусора. Если вам интересно, давайте попробуем разобраться.

habr.com/ru/articles/986784/

#gc #garbage_collector #python #cpython #reference_counting #incremental_gc

Peter Bittnerpeterbittner
2026-01-16

PyClean v3.5.0 released last week! Adds Complexipy debris removal. Try it with or now! `uvx pyclean`. pypi.org/project/pyclean/

Hugo van Kemenadehugovk
2026-01-14

I heard you like alphas?

Just released! Python 3.15.0a5, this time built against `main` from today instead of last month! 🚀

discuss.python.org/t/python-3-

Hugo van Kemenadehugovk
2026-01-14

Really good to see new releases from Astral, pyenv and GitHub Actions just hours after a new Python release. And for an alpha at that!

GitHub notifications showing new releases for actions/python-versions, pyenv/pyenv, astral-sh/uv and astral-sh/python-build-standalone.
Hugo van Kemenadehugovk
2026-01-13

Just released: Python 3.15.0a4 and look at those JIT numbers!

discuss.python.org/t/python-3-

2026-01-12

Connaissiez-vous l’interpréteur RustPython ? C'est une ré-écriture complète de CPython en Rust… ça promet d'être plus rapide et sujet à moins de bug de gestion mémoire (facilement commis en C).

rustpython.github.io/

***

Pour rappel Python est le langage de programmation le plus utilisé au monde. C'est aussi l'un des langages de script les plus lents.

#CPython #RustPython #Rust #Python

danzindanzin
2026-01-12

Published my first PyPI package today, called lafleur.

is a specialized CPython JIT fuzzer that uses a coverage-guided, evolutionary approach. It executes test cases, observes their effect on the JIT's state by analyzing verbose trace logs, and uses that feedback to guide its mutations, becoming smarter at finding interesting code paths over time.

Let me know if you use it or have any questions.

pypi.org/project/lafleur/
github.com/devdanzin/lafleur

Kevin Bowen :xfce:kevinbowen@hachyderm.io
2026-01-09

Looks like #pyenv releases will now be more closely in sync with #CPython releases thanks to some newly implemented automation. That's great news!

Thanks to the devs for making this happen.

github.com/pyenv/pyenv/issues/

#Python

Hugo van Kemenadehugovk
2026-01-07

Some new preliminary numbers from Ken Jin for the JIT in Python 3.15:

"On AArch64 macOS, the JIT has a 7-8% speedup over the tail calling interpreter with all optimizations enabled."

docs.python.org/3.15/whatsnew/

github.com/python/cpython/comm

This is in addition to 3-4% over the standard CPython interpreter on x86-64 Linux.

See also doesjitgobrrr.com

Top half of a chart showing dozens of benchmarks, most of them more than 1x faster.Bottom half of the chart. About half of these are also most of them more than 1x faster, about a quarter are around 0.9 faster, and a quarter are insignificant.
2025-12-24

[Перевод] 5 ключевых изменений в Python 3.14 глазами инженера

Команда Python for Devs подготовила перевод статьи о ключевых изменениях в Python 3.14. Автор разбирает релиз через призму внутреннего устройства интерпретатора и производительности: свободная многопоточность, конкурентные интерпретаторы, удалённая отладка, инкрементальная сборка мусора и новый Tail Calling интерпретатор.

habr.com/ru/articles/978836/

#cpython #gil #производительность #интерпретатор #байткод

Hugo van Kemenadehugovk
2025-12-16

Just released! 🚀

🐍 Python 3.15 alpha 3!

discuss.python.org/t/python-3-

🔬 PEP 799: A new high-frequency statistical sampling profiler and dedicated profiling package
💬 PEP 686: Python now uses UTF-8 as the default encoding
🌊 PEP 782: A new PyBytesWriter C API to create a Python bytes object
🎨 Colour code snippets in argparse help: bsky.app/profile/savannah.dev/
⚠️ Better error messages

danzindanzin
2025-12-16

There's another researcher, Zhengyu Liu, who's been finding CPython crashes (mostly use-after-free) at breakneck speed (19 in 5 days!): github.com/python/cpython/issu

Not sure about what technique they're using, but their site states they they favor "leveraging program analysis approaches to detect/exploit/patch vulnerabilities in real-world complex applications and systems".

Their reports are comprehensive, with great presentation and details.

jackfromeast.github.io/

danzindanzin
2025-12-15

There's a researcher, Jiang Yuancheng, who's doing a great work finding CPython crashes and memory leaks: github.com/python/cpython/issu

They've come up with a very clever idea for a new way of fuzzing, made a fine tool out of it, and are reaping great results.

Fuzzing can be a diminishing returns endeavor: you only have so many bugs to find. Their approach has shown itself to cover different areas and kinds of issues well, as shown by their track record.

2025-12-15

niklas-heer/speed-comparison: A repo which compares the speed of different programming languages.
github.com/niklas-heer/speed-c

This projects tries to compare the speed of different #programming languages. It uses an implementation of the Leibniz formula for π to do the comparison.

Notably:
- #Julia is the only dynamically-typed languages amoung the top tier, only ~28ms slower from #Cpp (#Clang).
- #Rust got a huge boost with nightly compiler (it is said that hand-written SIMD is used?)
- #Go tops in 3rd tier (very crowded 0.8s~1s)
- #PyPy and #Haskell (#GHC) are very closed (~1s), preceding #Racket, beating #Python (#NumPy) by a lot (~1.2s)
- The slowest is #CPython (~86s)

#Math #ScientificComputing

The benchmark result 
name	median
C++ (clang++)	223.89
C# (SIMD)	226.98
C++ (g++)	226.37
C++ (avx2)	231.03
Zig	232.9
D (LDC)	234.27
Rust (nightly)	234.7
C (clang)	237.46
Fortran 90	238.94
Nim	239.79
D (GDC)	243.46
Julia	251.37
C (gcc)	253.23
Swift (SIMD)	509.49
Rust	633.92
Go	888.5
Swift	892.8
Java (Vec Ops)	900.89
Java graalvm	904.98
Haxe (C++)	904.65
Swift (relaxed)	903.44
Objective-C	908.48
V	908.63
Javascript (bun)	928.5
WASM (C via Wasmtime)	933.27
Odin	947.59
Pony	946.29
Dart (AOT)	950.2
Scala	953.83
Common Lisp (SBCL)	955.82
LuaJIT	956.17
Ada (gnat-gcc)	965.81
Kotlin	967.3
Pony(nightly)	976.53
Deno (TypeScript)	983.86
Pascal (FPC)	980.15
F#	996.8
C#	1002.54
OCaml	1008.23
Python (PyPy)	1060.24
Haskell (GHC)	1177.2
Racket	1109.7
Crystal	1200.7
Javascript (nodejs)	1280.09
Java	1697.58
Python (NumPy)	2460.09
Clojure	2368.63
Groovy	2665.59
Dart (JIT)	3248.73
R	3360.34
Python (MyPyC)	3587.62
PHP	8625.78
Lua	8979.55
Elixir	10055.13
Erlang	10002.19
Janet (compiled)	16047.6
Gleam	28051.41
Ruby	35964.45
Janet	47210.1
Raku	74447.63
Perl	85152.14
Python (CPython)	86319.24
Accuracy is mostly ~9.5, but notably Swift (SIMD) is 8.7, FORTRAN 90 is 9.44
Hugo van Kemenadehugovk
2025-12-05

Just released! 🚀🐍

Python 3.14.2 (and 3.13.11)

Waiting for the .2 to upgrade? This one's especially for you!

So soon? We found some regressions, so here’s an expedited pair of releases. They also come with bonus security fixes.

discuss.python.org/t/python-3-

Two snakes enjoying a pie with 3.14 on the top and π crimping.
Riverfount :python_logo:riverfount@bolha.us
2025-12-03

🚀 Seu app Python "incha" a memória misteriosamente? Desvende o Garbage Collector do CPython: refcounting + GC geracional, ciclos traiçoeiros, tuning de thresholds que corta latência 20-50%!

Exemplos reais, benchmarks e gc.collect() na prática. Evite OOMs em prod AGORA! 💾🔥

👉 bolha.blog/riverfount/desvende

#Python #GarbageCollector #CPython #Memoria #DevOps #FastAPI

Jesus Michał "Le Sigh" 🏔 (he)mgorny@treehouse.systems
2025-12-03

BREAKING: #CPython 3.13.10 and 3.14.1 changed the multiprocessing message format in patch release. As a result, programs using multiprocessing may break randomly if they are running while #Python is upgraded (i.e. need restarting).

But apparently it's not a big deal, since all the cool kids are running Python in containers, and nobody is using Python for system tools anymore. Everything has been RIIR-ed and Python is only omnipresent in some backwaters like #Gentoo.

github.com/python/cpython/issu

Hugo van Kemenadehugovk
2025-12-02

Just released! 🚀🐍

Python 3.14.1

Waiting for the .1 to upgrade? This one's especially for you!

🥧 Deferred type annotation evaluation!
🥧 T-strings!
🥧 Zstandard!
🥧 Syntax highlighting in the REPL!
🥧 Colour in unittest, argparse, json and calendar CLIs!
🥧 UUID v6-8!
🥧 And much more!

discuss.python.org/t/python-3-

Two snakes enjoying a pie with 3.14 on the top and π crimping.

Client Info

Server: https://mastodon.social
Version: 2025.07
Repository: https://github.com/cyevgeniy/lmst