The Journey of Upgrading A Python Version: From a Debugger Perspective
summary
Upgrading a Python debugger for 3.10 forces code-level fixes: CPython replaces the old line table with PEP 626 and removes the legacy struct field, the new iterator helpers are not exported so the SDK resorts to copy‑pasting internal logic, and bytecode jump offsets are doubled in 3.10 which breaks breakpoint offsets after inserting three instructions for a non‑stopping breakpoint. Static linking is impractical — statically linking inflates the SDK from 100KB to 4MB — so the implemented fixes adjust offset math and restore correct stepping and output.
AI-written summary · about
chapters (10)
- 0:00Introduction
- 1:53What is Python
- 2:34What is a Python byte code
- 3:52What is Lookout Python SDK
- 5:07The line table
- 6:56Issues with the line table
- 7:48PEP626
- 9:39Backward Compatability
- 12:51Reminder
- 16:42Key takeaways
related talks
34mKeeping up with Python: what makes upgrades hard, and what can we do about it
30mPython 3.12's new monitoring and debugging API
26mPython 2 to 3: How to Upgrade and What Features to Start Using
28mWhat makes a Python debugger possible and how can we make it 100x faster
26mPython 2 is dead! Drag your old code into the modern age
26mMaking Python better one error message at a time
32mA new safe external debugger interface for CPython
41mAdvanced Python Debugging Techniques Using GDB
