Python Language Summit 2022
Episode Deep Dive
Guests Background
Alex Waygood joined this episode as a journalist-turned-developer covering the Python Language Summit on behalf of the core development team. Although he started programming only a couple of years ago (during the pandemic), Alex rapidly moved from building simple Python apps to contributing to CPython itself. He was invited to become a triager and ultimately served as the official blogger for the 2022 Python Language Summit. Throughout his coverage, Alex provided the community with a firsthand look at the many developments, proposals, and behind-the-scenes discussions among Python’s key contributors.
What to Know If You're New to Python
If you’re new to Python and curious about the language’s evolution, here are a few things from this episode to keep in mind:
- Python’s Global Interpreter Lock (GIL) can limit multi-threaded performance, but there are proposals to remove it or work around it.
- Python 3.11 focuses on performance boosts and new interpreter optimizations.
- The Python Language Summit is an annual meeting where core developers set the direction of Python’s future—hearing about these ideas is a great way to see where the language is headed.
- Many of the proposals discussed here (like F-strings, WebAssembly builds, and more) are advanced topics but show the scope of Python’s capabilities.
Key Points and Takeaways
Removing the Global Interpreter Lock (No GIL) Alex highlighted Sam Gross’s “no GIL” fork of CPython, which aims to remove Python’s global interpreter lock to allow true multi-core CPU usage from threads. While removing the GIL has been attempted before, Sam’s approach is notable for maintaining strong single-threaded performance.
- Tools and Links:
- Sam Gross’s “no GIL” fork on GitHub (discussed but no direct URL provided)
- Python 3.11: A Guided Tour Through Code for a closer look at recent Python internals
- Tools and Links:
Per-Interpreter GIL Proposal Eric Snow’s PEP 684 proposal suggests a different approach: give each sub-interpreter its own lock, thus avoiding direct GIL conflicts among threads. Although Python can already create sub-interpreters, it often shares state globally, creating race conditions. This initiative aims to isolate those states more effectively, potentially opening up new concurrency avenues.
- Tools and Links:
- Python.org discussion forums (discussed but no direct URL provided)
- PEP 684 draft (mentioned in the episode)
- Tools and Links:
Faster CPython Plans (Python 3.11 and Beyond) A central highlight of the episode was the massive performance boost in Python 3.11, powered by specialized adaptive bytecode. The new “specializing interpreter” can optimize hot spots in your code by customizing certain operations (like integer addition) at runtime. This is part of a bigger plan by Mark Shannon to achieve a 5x speedup over a few major releases.
- Tools and Links:
- Specialist (a PyPI project by Brandt Bucher to visualize optimized code)
- Python 3.11: A Guided Tour Through Code for in-depth coverage of 3.11’s speed features
- Tools and Links:
Cinder: Meta’s Optimizations for Python Cinder is a performance-oriented fork of CPython used internally at Meta/Instagram. It brings powerful features such as JIT compilation, immortal objects, and async optimizations. One key discussed improvement is “eagerly awaited coroutines,” which skip coroutine overhead if the task completes immediately (e.g., returning a cached value).
- Tools and Links:
- Cinder (Meta’s performance fork) mentioned on GitHub (no direct URL provided)
- Eagerly awaited coroutines described in the episode
- Tools and Links:
Immortal Objects Immortal objects never get their reference count decreased to zero, meaning they are never destroyed. This concept helps simplify concurrency and reference management in proposals like No GIL or Per-Interpreter GIL. Certain Python singletons (like
None
,True
, and some small integers) could become immortal objects to improve multi-thread performance scenarios.- Tools and Links:
- PEP discussions around immortal objects (no direct URL provided)
- Relevance to concurrency improvements
- Tools and Links:
Python in the Browser via WebAssembly Python’s growing WebAssembly story came through in discussions of Pyodide, PyScript, and mainstream CPython builds that can target Emscripten. Pyodide already merges CPython and the browser by translating Python into WebAssembly, and the team is steadily upstreaming these changes for official builds. This opens doors to running Python-based apps in browsers without separate server calls.
- Tools and Links:
- Pyodide (mentioned, no direct URL provided)
- PyScript (mentioned, no direct URL provided)
- Tools and Links:
Language Summit Logistics and Purpose Although the summit is invitation-only to maintain efficiency, Alex emphasized it’s not meant to be secretive. It’s a day for frank technical discussions among core developers and select contributors. The community benefits from a dedicated blogger (like Alex) who reports on progress so everyone can see what’s next.
- Tools and Links:
- Python Language Summit blog updates (pythonspeed.com or python.org dev blogs were alluded to, but no direct URL provided)
- Tools and Links:
Issue and PR Backlog Management With over 6,500 open issues, the backlog in CPython’s repository can be overwhelming. This discussion focused on whether older, dormant tickets should be closed to maintain clarity. Some core devs argue that old issues might still be valid and worth revisiting, while others find them a distraction if no one actively plans to fix them.
- Tools and Links:
- CPython GitHub issues (github.com/python/cpython/issues)
- Developer in residence role (Lucas Langa’s position)
- Tools and Links:
f-string Grammar Overhaul f-strings are beloved for readability, but under the hood, they’re parsed by a large, hand-written block of C code. Pablo Galindo Salgado’s idea is to bring F-string parsing into the new PEG-based parser, making maintenance simpler and opening doors to better error messages and new features. This change would unify the way all Python code is parsed.
- Tools and Links:
- Python’s PEG parser (integrated since Python 3.9)
- F-string grammar proposals by Pablo Salgado
- Tools and Links:
Summaries vs. Deeper Explorations The overall theme of the Summit was the exciting intersection of major performance leaps (3.11 and beyond) and deep structural changes (No GIL, sub-interpreters, etc.). While not all proposals will land immediately, each discussion signals Python’s constant evolution toward better speed, concurrency, and broader use cases (like running in the browser).
- Tools and Links:
- Past Language Summit reports (various references but no direct URL provided)
Interesting Quotes and Stories
- Alex on Being Invited as a Blogger: “I thought, maybe I could do it, I’ve got this journalism background. And they said yes—super flattering.”
- Michael on Multi-threading Myths: “It’s nice to remove the GIL, but a lot of folks don’t realize how often they can already saturate their CPUs with processes or C extensions. Sometimes, you just don’t need threads.”
Key Definitions and Terms
- GIL (Global Interpreter Lock): A mechanism in CPython that only allows one thread to execute Python code at a time.
- Sub-Interpreter: A secondary Python interpreter running in the same process space but usually sharing some global state.
- Specializing Interpreter: A technique where bytecode is adapted on the fly for more efficient runtime operations.
- f-Strings: A modern string formatting approach introduced in Python 3.6, allowing inline expressions within literal strings.
- WebAssembly (Wasm): A low-level bytecode for the web enabling languages like Python, Rust, C++, and more to run in browsers.
Learning Resources
- Python for Absolute Beginners: Ideal for anyone just getting started with Python’s fundamentals.
- Python 3.11: A Guided Tour Through Code: Deep dive into new features, including performance optimizations introduced in 3.11.
- Async Techniques and Examples in Python: Learn concurrency patterns in Python, complementing the GIL discussion.
- Rock Solid Python with Python Typing: Explore Python’s type-hinting ecosystem, which was briefly mentioned as a significant recent development in the language.
Overall Takeaway
The 2022 Python Language Summit showcased the ongoing innovation and collaboration driving Python forward—from long-anticipated changes to the GIL, to dramatic runtime performance improvements, to broader accessibility in the browser. Whether you’re excited about concurrency, speed, or new frontiers for Python-based apps, these discussions illustrate how the language continues to adapt and thrive. It’s an exciting time to be part of the Python community, and the summit’s direction hints at an even faster, more flexible future for the ecosystem.
Links from the show
2022 Python Language Summit: pyfound.blogspot.com
Individual Talks
Python without the GIL: pyfound.blogspot.com
Reaching a per-interpreter GIL: pyfound.blogspot.com
The "Faster CPython" project: 3.12 and beyond: pyfound.blogspot.com
WebAssembly: Python in the browser and beyond: pyfound.blogspot.com
F-strings in the grammar: pyfound.blogspot.com
Cinder Async Optimizations: pyfound.blogspot.com
The issue and PR backlog: pyfound.blogspot.com
The path forward for immortal objects: pyfound.blogspot.com
Sponsor: Reflect.run demo video: youtube.com
Sponsor: Reflect.run sign up: app.reflect.run
Sponsor: Microsoft for Startups Founder's Hub: startups.microsoft.com
Watch this episode on YouTube: youtube.com
Episode transcripts: talkpython.fm
--- Stay in touch with us ---
Subscribe to Talk Python on YouTube: youtube.com
Talk Python on Bluesky: @talkpython.fm at bsky.app
Talk Python on Mastodon: talkpython
Michael on Bluesky: @mkennedy.codes at bsky.app
Michael on Mastodon: mkennedy