core.py

Pablo Galindo and Łukasz Langa
undefined
Mar 14, 2024 • 1h 10min

Episode 9: Py Day with Emily Morehouse-Valcarcel

Let's talk about the Steering Council, running a small consultancy business, the Walrus, and pet peeves with our special guest today! ## Outline (00:00:00)  INTRO (00:00:56)  PART 1: Emily Morehouse (00:02:15)  Running a small consultancy business (00:04:39)  What features of JS do you miss in Python? (00:05:50)  Łukasz outnumbered in a world of Steering Council members (00:06:12)  Upgrading to new Python versions (00:07:00)  It depends on who deployed the project (00:09:44)  Second term as a Steering Council member (00:11:33)  Barry, play some bass for us (00:13:04)  Let's hear a recent war story (00:15:17)  Is this progress bar even working? (00:17:40)  The Villain Origin Story (00:21:37)  Emily, The Bringer of Doom (00:22:37)  Consensus within the Steering Council (00:25:52)  Syntax changes in Python are rare, right? Right? (00:28:22)  On implementing PEP 572 (00:32:52)  How would PyCon 2020 in Pittsburgh feel? (00:34:18)  How can you be mad about the Walrus? (00:36:10)  Favorite parts of the standard library (00:38:10)  Is hacking on Python a good experience to newcomers? (00:40:26)  Emily's pet peeve about Python, take 1 (00:42:17)  Emily's favorite change in Python in recent years (00:44:34)  Emily's pet peeve about Python, take 2 (00:46:34)  Łukasz's pet peeve (00:48:25)  Surprise extra question (00:49:42)  At core.py we are professionals (00:51:00)  PART 2: PR of the Week (00:54:00)  CALL TO ACTION: Upgrade Python.org to Django 4! (00:56:22)  PART 3: What's Going On in CPython? (00:56:38)  Faster Python updates (01:00:10)  Free threading: GIL can be disabled but we're not done yet! (01:04:17)  New defaults for SSL context flags (01:05:39)  python -m asyncio and sys.__interactivehook__ (01:06:24)  Surprise question: what is sys.__interactivehook__ even doing? (01:08:11)  OUTRO
undefined
Mar 1, 2024 • 1h 43min

Episode 8: The New Parser

The suspense was killing us! OK, the old parser was then... but what about NOW? We're finally answering this question... in more detail than you dared to ask for. PEG, memoization, funky secrets, and how a certain auto-formatter self-inflicted an existential crisis on itself. It's all there, told in barely 100 minutes! Can you believe it? # Timestamps (00:00:00)  INTRO (00:00:54)  PART 1: What even is PEG? (00:04:02)  You can't prove anything! (00:05:03)  What's a "parsing expression"? (00:08:23)  Our old LL1 parser wasn't doing its job (00:09:37)  "Soft keywords" in LL1: A Horror Story (00:13:16)  PART 2: How PEG was adopted by Python (00:17:10)  Why not LALR? (00:22:11)  The PEG paper wasn't enough either, if we're honest (00:26:26)  Less obvious advantages of the new parser (00:31:28)  Black is stuck with LL1, can it cope? (00:36:24)  Hedging against Łukasz, the bringer of doom (00:41:14)  PART 3: How does the PEG parser of CPython work? (00:44:30)  Pedantic Pablo on "exponential" (00:45:14)  Fresh news from literally yesterday last week (00:46:39)  Pedantic Pablo on "infinite" (00:47:32)  Memoization in the PEG parser (00:50:41)  Parse once, and if it fails, try again! (00:52:14)  How to model a grammar of programming mistakes? (00:56:36)  Why is there C code in my grammar file? (00:59:57)  Bro, do you even lift? (01:01:45)  How soft keywords work today: it's not free lunch (01:04:29)  Funky grammar secrets (01:09:07)  PART 4: PR OF THE WEEK (01:09:15)  audioop.c license shenanigans (01:14:56)  The secret profiler inside CPython (tests) (01:22:45)  PART 5: WHAT'S GOING ON IN CPYTHON? (01:23:30)  Free-threading changes (01:28:15)  Faster Python changes (01:35:39)  End of an era: docs get rid of Python 2 migration info (01:36:45)  Python --help output is now nicer (01:38:43) SQLite as a dbm backend (01:41:08)  OUTRO
undefined
7 snips
Jan 31, 2024 • 1h 23min

Episode 7: The Old Parser

Delve into the quirks of Python's tokenizer, from invisible tokens to the historical backticks that shaped syntax. Explore the evolution of Python grammar and parsing techniques, emphasizing the challenges of ambiguity and efficiency. Discover the transition from Python 2 to 3 and the role of lib223 in maintaining code integrity. Laugh at the quirks of backslashes and context managers, and learn about recent enhancements in error handling and memory performance in CPython. It's a wild ride through Python's parsing journey!
undefined
Jan 8, 2024 • 1h 31min

Episode 6 - An Exceptional Episode

The podcast covers topics such as exceptions, their evolution, and their implementation in Python. It discusses the use of 'try' blocks, the storage of current exceptions, and string exceptions. It also explores PEPs related to exception handling in Python 3K, including exception chaining and suppressing, as well as the difference between 'pass', 'None', and '...' in exception handling. Other interesting topics include zero-cost exceptions in Python 3.11 and the introduction of BaseExceptionGroup and ExceptionGroup in Python 3.10.
undefined
Dec 11, 2023 • 1h 21min

Episode 5 - Cinder with Carl Meyer

This time we're hosting a special guest: Carl Meyer from Meta. What is Cinder, how does it work, and how does it intersect with the future of Python 3? Find out in today's episode. 100% serious stuff! # Timestamps (00:00:00)  INTRO (00:00:53)  Carl Meyer's war story (00:02:27)  CINDER (00:03:22)  Static Python makes things significantly faster (00:08:15)  Cinder JIT and how it's tuned for Instagram (00:11:57)  Strict Python and the joy of import side effects (00:16:35)  The static typing controversy (00:18:52)  Upstreaming changes from Cinder? (00:22:53)  PEP 709: Comprehension inlining (00:28:35)  pip install CinderX (00:31:19)  Immortal instances (00:35:15)  asyncio.eager_task_factory() (00:39:39)  Carl's pet peeve with Python (00:44:49)  PR OF THE WEEK: PyPy's REPL in CPython (00:52:07)  WHAT'S GOING ON IN CPYTHON (00:52:22)  Python 3.12.1 (00:53:17)  Python 3.11.7 (00:54:45)  multiprocessing.SharedMemory track (00:56:49)  Fine-grained error locations for multi-line expressions (01:00:03)  libedit tab completion is fixed (01:02:14)  Colored exception tracebacks (01:05:11)  Removing testing modules from sys.modules, correctly (01:06:47)  SBOMs are a very serious matter (01:09:08)  Arrays by value on ARM (01:12:24)  Remove development environments and CAPS LOCK (01:15:30)  Interpreter cases generator refactored (01:16:17)  Free-threading news (01:20:01)  OUTRO
undefined
49 snips
Nov 29, 2023 • 1h 13min

Episode 4 - Frame Evaluation

What makes Python an interpreter? Today we're talking about ceval.c, the wonders of frame evaluation, and how it changed over the years. # Timestamps (00:00:00)  INTRO (00:00:59)  BACK TO PYTHON 2.6 (00:02:53)  Stack virtual machine (00:04:41)  First encounter with opcodes (00:08:06)  What even is frame evaluation? (00:12:51)  Stack! Which stack? (00:15:46)  PRESENT DAY (00:16:41)  Computed gotos (00:21:22)  PEP 523: JIT me, maybe (00:26:53)  Let's generate the interpreter (00:29:08)  The JIT is coming (00:33:13)  Python function call inlining (00:37:23)  Instrumentation: DTrace, PEP 669 (00:41:50)  lltrace and pystats (00:44:02)  Eval breaker (00:47:54)  Signal handling (00:50:47)  Recursion limits (00:54:27)  String concatenation special case (00:58:24)  WHAT'S GOING ON IN CPYTHON? (00:58:42)  3.12.0a2 (00:59:12)  Critical section API adoption (00:59:34)  PyOnceFlag (01:00:28)  PyDict_GetItemRef() (01:03:36)  PyList_Extend() and PyDict_Pop() (01:04:18)  Parser: better error messages for non-matching elif/else (01:05:39)  glob.translate() (01:07:22)  TLS-PSK in the ssl module (01:08:35)  IDLE debugger improvements (01:10:50)  First micro-op in the Tier 2 interpreter (01:11:18)  OUTRO
undefined
39 snips
Nov 13, 2023 • 1h 12min

Episode 3 - Imports, frozen modules, Python news

This episode of the podcast covers topics like importing modules and how it works in Python, the concept of frozen modules and its impact on startup time, changes to the evaluation loop in Python, exciting changes in Python 3.12, efficient storage of Unicode code point names, and improvements in thread.join function in Python 3.12 along with the PR of the week related to trace back object creation.
undefined
29 snips
Oct 30, 2023 • 1h 15min

Episode 2 - PEP 703: Removing the GIL

The podcast discusses the concept of removing the Global Interpreter Lock (GIL) in Python. It explores the current state of things including reference counting and garbage collection. Various historical attempts to remove the GIL are mentioned. The podcast then dives into the details of PEP 703 for Python 3.13, discussing biased reference counting, speedups, memory management, and the challenges of removing the GIL. It emphasizes the importance of synchronization, avoiding locks, heap segmentation, and memory usage in Python. Lastly, the podcast explores the implementation challenges and considerations of PEP 703, highlighting the need for communication, testing, and coordination.
undefined
48 snips
Oct 30, 2023 • 1h 12min

Episode 1 - Core Sprint in Brno & Python 3.13.0 alpha 1

In this first episode Pablo and Łukasz talk about what happened in at the 2023 Cpython Core Developer sprint. Join us and learn from our ramblings about a possible new CPython new JIT compiler, how we are making the REPL easier, what in the world is a memory hive, and how we are trying to make a new C API without making everyone mad. Timestamps (00:00:00) Intro (00:01:02) Cpython core developer sprint (00:04:54) Pablo's highlights (00:06:09) Łukasz's highlights (00:08:08) Coverage in the standard library (00:12:20) Improving CPython's REPL (00:20:38) Copy and patch JIT compiler prototype (00:28:16) Tier1 and Tier2 interpreter (00:41:25) Python 3.13.0 alpha 1 and doing CPython releases (00:52:08) C-API improvements (00:58:28) Sprint experience and tourism (01:01:49) Steering council Q&A (01:08:19) Closing thoughts

The AI-powered Podcast Player

Save insights by tapping your headphones, chat with episodes, discover the best highlights - and more!
App store bannerPlay store banner
Get the app