~/talk

Don't Live Patch Your CPython Interpreter

Talkat PyData Chicago 2016 · 2016-08-26..08-28· [python]
slides:none on file

A pip‑installable C extension called ratch live‑patches CPython by assembly‑trampolining the py_eval_frame_x loop and injecting callbacks (get_rat/set_rat) so every VM stack push/pop can trigger a hook. Demos include nested Python 3/2/1 interpreters in one process and read‑watches that can lazy‑evaluate or double integers. The patch is version‑specific (only Python 3.5.0 / 3.5.4 / 3.4.3 provided), requires ~50–60 LOC kernel changes, and fails on Windows and many C modules (numpy).

AI-written summary · about

  1. 0:00Introduction
  2. 1:24Why avoid this code
  3. 2:06Exploring Python examples
  4. 4:57Temptation of live patching
  5. 7:00Introducing read watches
  6. 11:14How read watches work
  7. 15:08Never live patch CPython
  8. 17:54Technical judgment in coding
  9. 28:09Guiding technical judgment
  10. 37:59When live patching is acceptable
  11. 39:22PEP 523 and CPython patching
  12. 40:26Audience questions on technical sophistication
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.