#cpython — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #cpython, aggregated by home.social.
-
Remember `build-details.json` (PEP 739)? The file added to #CPython to support cross-compiling extensions?
Well, turns out it gets generated incorrectly when cross-compiling CPython itself 🤦. Let's see if I can fix that…
-
Remember `build-details.json` (PEP 739)? The file added to #CPython to support cross-compiling extensions?
Well, turns out it gets generated incorrectly when cross-compiling CPython itself 🤦. Let's see if I can fix that…
-
Organizing DebConf 26, adding VLAN support in Debian installer. #Freexian collaborators worked on these and many more contributions to #Debian in July 2026.
Read all the details at https://www.freexian.com/blog/debian-contributions-07-2026/?utm_source=mastodon&utm_medium=social
We thank the organizations subscribing to our Long Term Support contracts (https://www.freexian.com/lts/?utm_source=mastodon&utm_medium=social) and consulting services (https://www.freexian.com/services/?utm_source=mastodon&utm_medium=social) for making this possible.
-
Organizing DebConf 26, adding VLAN support in Debian installer. #Freexian collaborators worked on these and many more contributions to #Debian in July 2026.
Read all the details at https://www.freexian.com/blog/debian-contributions-07-2026/?utm_source=mastodon&utm_medium=social
We thank the organizations subscribing to our Long Term Support contracts (https://www.freexian.com/lts/?utm_source=mastodon&utm_medium=social) and consulting services (https://www.freexian.com/services/?utm_source=mastodon&utm_medium=social) for making this possible.
-
RSS вырос до 3 ГБ, а tracemalloc показывает 180 МБ: как найти остальные 2,8
RSS растёт к лимиту контейнера, tracemalloc показывает прежние 180 МБ, а gc.collect() ничего не меняет. Разберём, как в такой ситуации отделить утечку Python-объектов от нативных аллокаций и удержания памяти системным аллокатором — и понять, где именно искать причину до OOMKilled . Разобраться с памятью
https://habr.com/ru/companies/otus/articles/1068476/
#python #утечки_памяти #сборщик_мусора #профилирование_памяти #FastAPI #tracemalloc #RSS #CPython #memray
-
[Перевод] Собирали по частям, теряли по-крупному: почему новый сборщик мусора откатили в Python 3.14.5
В Python 3.14.0 (октябрь 2025-го) разработчики заменили классический иерархический сборщик мусора на инкрементальный – обещали более короткие паузы на больших свалках. Но уже в 3.14.5 (май 2026-го) это решение полностью откатили. Что пошло не так? И почему альтернативный сборщик даже не сделали переключаемой опцией, как в Java или Go? Разбираемся на бенчмарках, запустив локально обе версии интерпретатора.
https://habr.com/ru/companies/timeweb/articles/1065778/
#CPython #сборщик_мусора #управление_памятью #хрупкие_ссылки #динамическая_память #timeweb_статьи_перевод
-
🪟🦾🥈 Windows on Arm (aka aarch64-pc-windows-msvc) has now been promoted to tier 2 of CPython platform support.
Tier 3 has no response SLA to failures. Tier 2 requires breaking changes to be fixed or reverted within 24 hours, and failures block a release.
Tier 3 requires at least one core team member signed up to support the platform. Tier 2 requires at least two, and we have three here.
https://peps.python.org/pep-0011/
#Python #CPython #PEP11 #WindowsOnArm #Windows -
🪟🦾🥈 Windows on Arm (aka aarch64-pc-windows-msvc) has now been promoted to tier 2 of CPython platform support.
Tier 3 has no response SLA to failures. Tier 2 requires breaking changes to be fixed or reverted within 24 hours, and failures block a release.
Tier 3 requires at least one core team member signed up to support the platform. Tier 2 requires at least two, and we have three here.
https://peps.python.org/pep-0011/
#Python #CPython #PEP11 #WindowsOnArm #Windows -
Zero days since I've discovered a random #CPython bug that triggers in very specific circumstances and I don't really have time to report it, nor can expect anyone to do it for me.
This time it's a test failure and refcounts being broken while running fastjsonschema's test suite on #Python 3.15 freethreading with pytest's --junit-xml option enabled 😱. And of course removing --junit-xml makes all tests pass.
EDIT: and of course I cannot reproduce outside Portage. Yet inside, it reliably crashes every single time.
EDIT 2: couldn't reproduce at all the next day.
-
Zero days since I've discovered a random #CPython bug that triggers in very specific circumstances and I don't really have time to report it, nor can expect anyone to do it for me.
This time it's a test failure and refcounts being broken while running fastjsonschema's test suite on #Python 3.15 freethreading with pytest's --junit-xml option enabled 😱. And of course removing --junit-xml makes all tests pass.
EDIT: and of course I cannot reproduce outside Portage. Yet inside, it reliably crashes every single time.
EDIT 2: couldn't reproduce at all the next day.
-
Python: как один из самых медленных языков стал королем нейросетей
Python. IT-курсы разрекламировали его как один из самых легких языков для входа в разработку, любители ИИ создают на нем свои первые нейросети, а некоторые сеньоры Java и C++ по-прежнему смотрят на него свысока, считая недостаточно строгим и производительным для «серьезной» разработки. В любом случае сегодня о Python знают все. Поскольку заметный рост его популярности пришелся на 2010-е годы, многие считают, что язык появился сравнительно недавно. Но это неверно: Python старше большинства современных веб- и ML-фреймворков, массовой мобильной разработки и нынешнего AI-бума. Как язык с репутацией медленного стал основным инструментом data science и машинного обучения, почему он поднялся на вершину рейтингов популярности и какую роль в этом сыграли его архитектура и экосистема — разберем в этой статье.
https://habr.com/ru/articles/1061952/
#Python #CPython #машинное_обучение #нейросети #PyTorch #TensorFlow #c++ #CUDA #autograd #deep_learning
-
Zero days since #CPython broke the extension ABI at the very last minute after asking everyone repeatedly to test prereleases. And of course they don't bother tracking ABI changes in any way, so they could at least give people heads up that important pieces of their system will start segfaulting after the upgrade. All they can offer is a knee-jerk response of "we never promised ABI stability".
And yes, this is a huge PITA for #Gentoo users who opted in to helping out.
https://github.com/python/cpython/pull/152448#issuecomment-5016129511
-
Zero days since #CPython broke the extension ABI at the very last minute after asking everyone repeatedly to test prereleases. And of course they don't bother tracking ABI changes in any way, so they could at least give people heads up that important pieces of their system will start segfaulting after the upgrade. All they can offer is a knee-jerk response of "we never promised ABI stability".
And yes, this is a huge PITA for #Gentoo users who opted in to helping out.
https://github.com/python/cpython/pull/152448#issuecomment-5016129511
-
I **finally** got a PoC for a #WASI distribution for #CPython! Looking for feedback at https://discuss.python.org/t/108168 .
-
I **finally** got a PoC for a #WASI distribution for #CPython! Looking for feedback at https://discuss.python.org/t/108168 .
-
I have notes about each one of the optimizations, including the ideas that did not work out, and I'm tempted to write about it if I find the time. I certainly learned a lot about #cPython internals and performance characteristics. Some of the optimizations were pretty surprising.
-
I have notes about each one of the optimizations, including the ideas that did not work out, and I'm tempted to write about it if I find the time. I certainly learned a lot about #cPython internals and performance characteristics. Some of the optimizations were pretty surprising.
-
step 1: do an experimental JIT
step 2: do a website called https://www.doesjitgobrrr.com to track performance
step 3: write a PEP called "JIT Go Brrr"
step 4: non-experimental JIT gone brrr?
step 5: CPython gone brr?
step 6: brrr?https://peps.python.org/pep-0836/
#Python #CPython #JIT #PEP #PEP836 #JIT #GoBrrr -
step 1: do an experimental JIT
step 2: do a website called https://www.doesjitgobrrr.com to track performance
step 3: write a PEP called "JIT Go Brrr"
step 4: non-experimental JIT gone brrr?
step 5: CPython gone brr?
step 6: brrr?https://peps.python.org/pep-0836/
#Python #CPython #JIT #PEP #PEP836 #JIT #GoBrrr -
Have you written a new PEP and are ready for a PEP number? (Either you're a Python core team member or found one to sponsor your PEP.)
Old way: scour through https://peps.python.org/ and https://github.com/python/peps/pulls to find which is next
Better way:
❯ uvx pepotron next
Next available PEP: 837🆕 New: visit https://hugovk.dev/next-pep-number/
-
Have you written a new PEP and are ready for a PEP number? (Either you're a Python core team member or found one to sponsor your PEP.)
Old way: scour through https://peps.python.org/ and https://github.com/python/peps/pulls to find which is next
Better way:
❯ uvx pepotron next
Next available PEP: 837🆕 New: visit https://hugovk.dev/next-pep-number/
-
🐍🚀 Out now: Python 3.15 beta 3!
💤 Lazy imports!
🧊 frozendict builtin!
💂 sentinel builtin!
📉 Tachyon profiler!
🖼️ Frame pointers everywhere!
🛅 Unpacking in comprehensions!
🗣️ UTF-8 as the default encoding!
🆕 Package startup config files!
⌨️ TypedDict and TypeForm!
🐎 Faster JIT!
🎨 More colour!
🚌 & more!Library maintainer? We *strongly encourage* you to add 3.15 to your CI and test during the beta. And send us those bugs reports!
https://discuss.python.org/t/python-3-15-0-beta-3-is-here/107866?u=hugovk
#Python #Python315 #CPython #release -
🐍🚀 Out now: Python 3.15 beta 3!
💤 Lazy imports!
🧊 frozendict builtin!
💂 sentinel builtin!
📉 Tachyon profiler!
🖼️ Frame pointers everywhere!
🛅 Unpacking in comprehensions!
🗣️ UTF-8 as the default encoding!
🆕 Package startup config files!
⌨️ TypedDict and TypeForm!
🐎 Faster JIT!
🎨 More colour!
🚌 & more!Library maintainer? We *strongly encourage* you to add 3.15 to your CI and test during the beta. And send us those bugs reports!
https://discuss.python.org/t/python-3-15-0-beta-3-is-here/107866?u=hugovk
#Python #Python315 #CPython #release -
Как я ускорил dependency injection в Python в 130 раз: от рефлексии до компиляции графа
«Контейнер для DI — это лишний оверхед, передай зависимость руками и не выдумывай». Я тоже так считал, пока не замерил: наивный контейнер резолвил типичный сервис-граф примерно в 200 раз медленнее ручной сборки. Рассказываю, как тремя шагами — кэш плана, удаление проверки, которая всё равно не срабатывает, и компиляция графа в одну плоскую функцию — довёл резолв с 52.9 до 0.40 мкс/оп, почти как руками. И как при этом не дал exec-кодогенерации тихо собирать не те объекты в проде. Приёмы переносимые: профилирование микрооверхеда, выкидывание мёртвой защиты, фаззинг на эквивалентность. Читать разбор
https://habr.com/ru/articles/1048184/
#python #оптимизация_производительности #профилирование #dependency_injection #метапрограммирование #кодогенерация #бенчмарк #cpython
-
Out now: Python 3.14.6 and 3.13.14!
A day late to include a last-minute OpenSSL release in the installers. Thanks to @standupmaths for the help with the release notes :)
https://discuss.python.org/t/python-3-14-6-and-3-13-14-are-now-available/107714
#Python #CPython #Python314 #Python313 #release -
Out now: Python 3.14.6 and 3.13.14!
A day late to include a last-minute OpenSSL release in the installers. Thanks to @standupmaths for the help with the release notes :)
https://discuss.python.org/t/python-3-14-6-and-3-13-14-are-now-available/107714
#Python #CPython #Python314 #Python313 #release -
@schenklklopfer Huh, interesting.
cPython 3.12.3:
9475.86 MB/sPyPy (nightly, default settings):
4378.93 MB/sPyPy (nightly, --jit off):
3676.98 MB/sMy guess: Most of the time is spent in bytes.find(), which is a highly optimized C function in #cPython already. The actual python overhead is so small that my parser even beats #rust (emmett-core) in this benchmark. #PyPy does not have much room for its #JIT to do anything, and seems to have a less optimized stdlib?
-
@schenklklopfer Huh, interesting.
cPython 3.12.3:
9475.86 MB/sPyPy (nightly, default settings):
4378.93 MB/sPyPy (nightly, --jit off):
3676.98 MB/sMy guess: Most of the time is spent in bytes.find(), which is a highly optimized C function in #cPython already. The actual python overhead is so small that my parser even beats #rust (emmett-core) in this benchmark. #PyPy does not have much room for its #JIT to do anything, and seems to have a less optimized stdlib?
-
#Poezio 0.18 has been released ( #XMPP / #XMPPClient / #Slixmpp / #Python / #CPython ) https://poez.io/
-
#Poezio 0.18 has been released ( #XMPP / #XMPPClient / #Slixmpp / #Python / #CPython ) https://poez.io/
-
#Slixmpp 1.15.0 has been released ( #XMPP / #Jabber / #SleekXMPP / #Python / #CPython ) https://slixmpp.readthedocs.io/
-
#Slixmpp 1.15.0 has been released ( #XMPP / #Jabber / #SleekXMPP / #Python / #CPython ) https://slixmpp.readthedocs.io/
-
Day 2 of PyCon Italia 2026 has started! ☕🐍
After a social evening that ended a little later than planned, we're back in the keynote room this morning with Diego Russo talking about the evolution of CPython performance.
It's always a pleasure to see friends from the Python community on stage, especially when the topic is how Python itself keeps getting faster release after release.
A strong start to the second day of the conference. 🚀
-
Day 2 of PyCon Italia 2026 has started! ☕🐍
After a social evening that ended a little later than planned, we're back in the keynote room this morning with Diego Russo talking about the evolution of CPython performance.
It's always a pleasure to see friends from the Python community on stage, especially when the topic is how Python itself keeps getting faster release after release.
A strong start to the second day of the conference. 🚀
-
@mgorny You're welcome?
We don't usually do RCs for patch releases, the last one was five years ago. The 3.14.5 RC was specifically for the GC change.
Unfortunately timelines were a bit short because I wanted to get this out, but it took a bit of time to prepare and test the patches and I didn't want to rush that, nor release during PyCon US.
https://discuss.python.org/t/reverting-the-incremental-gc-in-python-3-14-and-3-15/107014
#Python #CPython -
@mgorny You're welcome?
We don't usually do RCs for patch releases, the last one was five years ago. The 3.14.5 RC was specifically for the GC change.
Unfortunately timelines were a bit short because I wanted to get this out, but it took a bit of time to prepare and test the patches and I didn't want to rush that, nor release during PyCon US.
https://discuss.python.org/t/reverting-the-incremental-gc-in-python-3-14-and-3-15/107014
#Python #CPython -
Always appreciate how people release RCs to give others opportunity to test their changes early, then release final versions before the fixes for "breaks #Portage" kind of regressions introduced in the RCs are merged.
-
Always appreciate how people release RCs to give others opportunity to test their changes early, then release final versions before the fixes for "breaks #Portage" kind of regressions introduced in the RCs are merged.
-
Pushing Python to its limits? “How Python’s Heart Stays Safe at Full Speed” digs into how the core runtime stays fast without sacrificing safety.
Read More: https://zalt.me/blog/2026/05/python-heart-safety-speed
-
Inspired by @hugovk 's Bluesky Python core devs starter pack, I created one for Mastodon(.social): https://mastodon.social/collections/116540107831540575
A very new feature, and as such quite limited. If I've missed anyone on mastodon.social please let me know! If you're on another instance, I'm afraid I can't add you yet :'-(
-
Inspired by @hugovk 's Bluesky Python core devs starter pack, I created one for Mastodon(.social): https://mastodon.social/collections/116540107831540575
A very new feature, and as such quite limited. If I've missed anyone on mastodon.social please let me know! If you're on another instance, I'm afraid I can't add you yet :'-(
-
Как устроен словарь в CPython: compact dict, key sharing и что с ним делает free-threading
У dict в Python слишком простая внешность: положили ключ, достали значение, пошли дальше. Но за этим стоит один из самых вылизанных участков CPython — с компактным хранением, сохранением порядка вставки, общими ключами для экземпляров классов, оптимизациями доступа к атрибутам и новыми компромиссами из-за free-threading. В статье разберём, почему обычный словарь давно перестал быть «просто хеш-таблицей», как его устройство влияет на память и скорость кода, и какие привычки Python-разработчика могут незаметно ломать быстрый путь интерпретатора. Разобрать dict
https://habr.com/ru/companies/otus/articles/1029210/
#python #CPython #словарь_Python #хештаблица #compact_dict #оптимизация_памяти
-
Me (yesterday): I'll just tidy up the way the inspect module's CLI reports objects from modules with no source code available (as cryptic tracebacks are not a friendly outcome)
Me (today): oh, wow, we did NOT consider how this interface would behave when the given object reference is an alias rather than the actual defining location for that object (it lies, oh how it lies) -
Me (yesterday): I'll just tidy up the way the inspect module's CLI reports objects from modules with no source code available (as cryptic tracebacks are not a friendly outcome)
Me (today): oh, wow, we did NOT consider how this interface would behave when the given object reference is an alias rather than the actual defining location for that object (it lies, oh how it lies) -
Nuitka 4.0: как я разогнал свой Python-скрипт на 335% и почему JIT-будущее уже на пороге
Представьте себе: вы запускаете свой старый добрый Python-скрипт, он привычно задумывается на пару секунд, а потом начинает работать. А теперь представьте, что тот же самый скрипт без единого изменения в коде — просто после прогона через одну утилиту — стартует почти мгновенно и работает втрое быстрее. Никакой магии, просто вышел Nuitka 4.0. 22 апреля 2026 года проект, который когда-то начинался как нишевый компилятор, дорос до мажорной версии 4.0. И это не просто «пофиксили баги, добавили пару флагов» — это реально меняет правила игры для тех, кто пишет на Python и хочет, чтобы код летал, а не ползал. По данным официальных тестов, скомпилированные скрипты показывают повышение производительности на 335% в pystone-бенчмарке по сравнению с CPython. Можете представить, что ваш веб-парсер или ML-пайплайн ускоряется втрое без переписывания на Rust. Если совсем просто: PyInstaller просто пакует ваш скрипт вместе с интерпретатором в один файл — по сути, это архив с «батарейками». А Nuitka переписывает весь Python-код на чистый C и компилирует его в настоящий исполняемый файл. Никакой интерпретации на лету — только скомпилированный бинарник, который в теории может обогнать даже PyPy. И теперь, с версией 4.0, эта теория стала куда ближе к практике. «Раньше я думал, что ускорение от Nuitka довольно скромное... но с версией 4.0 вижу реальный прогресс», — примерно так звучат комментарии на Hacker News , и я с ними согласен.
-
😂 Look, someone created a #dynamic #language called "Zef" (because why not?) and now believes they can compete with #Lua, #QuickJS, and #CPython. 🚀 Just another wild ride through "how to optimize your #hobby #project to do something totally unnecessary" land! 🛠️
https://zef-lang.dev/implementation #Zef #HackerNews #ngated -
RE: https://fosstodon.org/@savannah/116416941269710052
This is really good! There's a lot going on in CPython, here's just a few highlights.
#Python #CPython #CoreDispatch -
I also built `ft-review-toolkit` (using ThreadSanitizer) to check for free-threading readiness, which has found real data races in 12 extensions so far.
If you maintain a Python C extension and want a high-quality, human-reviewed bug report (or help migrating to free-threading), just let me know!
All the toolkits are open source:
https://github.com/devdanzin/cext-review-toolkit
https://github.com/devdanzin/ft-review-toolkit -
The results so far? Fixes merged in 14 projects!
Massive shoutout to the maintainers of simplejson, Cython, memray, h5py, greenlet, bottleneck, guppy3, bitarray, igraph, APSW, Pillow, regex, and many others!
The feedback they gave me, especially when pointing out my tool's false positives, was invaluable for making the scanners better.
It's been incredibly rewarding to see the tools find interesting bugs and watch the community merge the fixes so quickly.
#Python #CPython -
Historically, automated bug-finding tools have a bad habit of producing high-noise findings (and now worse: convincing AI slop) that just wastes maintainer time.
I built `cext-review-toolkit` using multiple specialized agents to find bugs, and I try to reproduce every finding from pure Python before reporting it.
Human review + pure-Python reproducers act as a necessary filter against false positives.
-
Systematically reviewing Python C extensions (575+ bugs found so far) and offering to analyze yours!
I’ve recently analyzed 44 C extensions for correctness and free-threading readiness. I'd love to run the analysis on your extension too.
If you want the deep dive into the methodology, the false positive rates, and what I've learned, I wrote a full post here: https://discuss.python.org/t/systematically-finding-bugs-in-python-c-extensions-575-confirmed-so-far/106875
But if you just want your C extension checked, reply below or DM me!
#Python #CPython -
Please welcome Stan Ulbrych @stanfromireland as the newest member of the Python core team!
https://discuss.python.org/t/vote-to-promote-stan-ulbrych/106562