Skip to content

Forward-port generational GC #148726

@sergey-miryanov

Description

@sergey-miryanov

Feature or enhancement

Proposal:

It was decided to revert the incremental GC and restore the generational GC from Python 3.13.

After discussing with @nascheme, we plan to forward-port the generational GC from 3.13 with minimal changes.

Here is the plan:

3.14

  1. Forward-port the generational GC from 3.13 with minimal changes
  2. Backport the heap_size calculation logic

3.15

  1. Forward port from 3.14
  2. Backport weakref's callbacks changes (b6b99bf, 350c58b, 654b8d9)
  3. Backport changes required for pystats (c98c5b3)
  4. Backport GC frame for Tachyon (336366f)
  5. Backport extended data for callbacks: duration, candidates (598d4c6, 227b9d3)
  6. Backport gc-stats from external processes (Add a module for monitoring GC statistics #146527)

AFAICT, these are all the changes that need to be forward-ported or backported for the 3.14 and 3.15.

Has this already been discussed elsewhere?

I have already discussed this feature proposal on Discourse

Links to previous discussion of this feature:

https://discuss.python.org/t/reverting-the-incremental-gc-in-python-3-14-and-3-15/107014

Linked PRs

Metadata

Metadata

Labels

3.14bugs and security fixes3.15new features, bugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)type-featureA feature request or enhancement

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions