gh-142516: Forward-port generational GC by zanieb · Pull Request #148687 · python/cpython
This patch is was created by taking the following two branches as references
- https://github.com/sergey-miryanov/cpython/tree/feat/gc-3g
- https://github.com/nascheme/cpython/tree/gc-gen-3.14
and removing the runtime toggle behavior included in their implementations then doing multiple comparative passes to the 3.13 implementation and changes to the GC since 3.13.
This process was performed using an LLM and is intended as a starting point, not a final patch — as I do not have sufficient CPython GC expertise to audit the work.
See https://discuss.python.org/t/reverting-the-incremental-gc-in-python-3-14-and-3-15/107014 for broader context.
The 3.14 backport can be found at #148694
📚 Documentation preview 📚: https://cpython-previews--148687.org.readthedocs.build/