
← core.py17 apr 2025 · 1 u 58 min
Episode 21: A Garbage Episode
<p>We talked about this episode for months now, and it's finally here. Garbage collection in its full glory. Classic and free-threaded. Generational and single-pass. With eager and delayed untracking. We cover it all! Explicitly.</p><p><br></p><p>## Timestamps</p><p><br></p><p>(00:00:00) THE FUCKING INTRO</p><p>(00:02:03) PART 0: SPORTS NEWS</p><p>(00:03:19) PART 1: GARBAGE COLLECTION</p><p>(00:03:57) The big problem with refcounting</p><p>(00:08:35) Solving reference cycles through PyGC_Head</p><p>(00:11:45) 64 bits ought to be enough for anybody</p><p>(00:17:30) Why a doubly-linked list?</p><p>(00:21:15) How reference counting makes finding cycles easier</p><p>(00:26:25) Roots bloody roots</p><p>(00:30:17) How are objects in the cycle destroyed?</p><p>(00:31:58) Object resurrection</p><p>(00:43:21) Why do you need "generations"?</p><p>(00:52:26) Delayed untracking</p><p>(00:54:46) Weak references, strong problems</p><p>(00:59:19) GC in free threading</p><p>(01:03:27) Reference counting in free-threading builds</p><p>(01:10:08) Incremental GC talk is DEFERRED</p><p>(01:11:00) PART 2: PR OF THE WEEK</p><p>(01:17:15) Type checking the standard library itself?</p><p>(01:29:51) PART 3: WHAT'S GOING ON IN CPYTHON?</p><p>(01:30:15) Free-threading changes</p><p>(01:32:54) Performance updates</p><p>(01:36:11) http.server supports HTTPS!</p><p>(01:37:01) PEP 768 and 758 landed</p><p>(01:37:34) HACL*</p><p>(01:38:24) fnmatch.filterfalse()</p><p>(01:38:54) Bugfixes</p><p>(01:42:46) Curiosities</p><p>(01:54:49) OUTRO</p>