GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Forward-port generational GC · Issue #148726 · python/cpython

Forward-port generational GC #148726

New issue
Copy link
New issue
Copy link
Closed
Closed
Forward-port generational GC#148726
Copy link
Assignees
sergey-miryanov
Labels
3.14bugs and security fixesbugs and security fixes3.15bugs and security fixesbugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-featureA feature request or enhancementA feature request or enhancement

Description

@sergey-miryanov
sergey-miryanov
opened on Apr 18, 2026
Issue body actions

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

  • [3.14] GH-148726: Forward-port generational GC #148720
  • GH-148726: Forward-port generational GC. #148746
  • [3.14] GH-148726: Forward-port generational GC (another way) #148772
  • [3.14] GH-148726: Add heap_size to _gc_runtime_state #149025
  • GH-148726: Add heap_size to generational GC #149195
  • gh-148726: Document the GC change in What's New in Python 3.14 #149209
  • [3.14] gh-148726: Document the GC change in What's New in Python 3.14 (GH-149209) #149249
  • gh-148726: Add gc changes to What's New #149398
Reacted by Neil Schemenauer and Shamil

Activity

  1. sergey-miryanov
    added
    type-featureA feature request or enhancementA feature request or enhancement
    on Apr 18, 2026
  2. StanFromIreland
    added
    interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)
    3.14bugs and security fixesbugs and security fixes
    3.15bugs and security fixesbugs and security fixes
    on Apr 18, 2026
  3. sergey-miryanov
    self-assigned this
    on Apr 18, 2026
  4. hugovk
    added a commit that references this issue on Apr 26, 2026

    [3.14] GH-148726: Forward-port generational GC (#148720)

    9a7e205
  5. sergey-miryanov commented on Apr 26, 2026

    @sergey-miryanov
    sergey-miryanov
    on Apr 26, 2026
    ContributorAuthor
    More actions

    With #148720 landed, I'll open a PR for the heap_size backport.

  6. hugovk
    added a commit that references this issue on Apr 29, 2026

    [3.14] GH-148726: Add heap_size to _gc_runtime_state (#149025)

    4d0ae4c
  7. sergey-miryanov commented on Apr 29, 2026

    @sergey-miryanov
    sergey-miryanov
    on Apr 29, 2026
    ContributorAuthor
    More actions

    #149025 has merged. I plan to forward-port the changes to the 3.15 branch once #148746 is merged.

  8. nascheme
    added a commit that references this issue on Apr 30, 2026

    GH-148726: Forward-port generational GC. (GH-148746)

    1575a81
  9. hugovk
    added 2 commits that reference this issue on May 1, 2026

    gh-148726: Document the GC change in What's New in Python 3.14 (#149209)

    4e3811f

    [3.14] gh-148726: Document the GC change in What's New in Python 3.14 (…

    7c3cc0f
  10. pablogsal
    added a commit that references this issue on May 4, 2026

    GH-148726: Add heap_size to generational GC (#149195)

    e89568f
  11. sergey-miryanov commented on May 5, 2026

    @sergey-miryanov
    sergey-miryanov
    on May 5, 2026
    ContributorAuthor
    More actions

    All planned tasks done. Closing this out.

    Reacted by Hugo van Kemenade
  12. sergey-miryanov
    closed this as completedon May 5, 2026
  13. hugovk commented on May 5, 2026

    @hugovk
    hugovk
    on May 5, 2026
    Member
    More actions

    Thank you for all your work on this!

    Reacted by Sergey Miryanov
  14. hauntsaninja commented on May 5, 2026

    @hauntsaninja
    hauntsaninja
    on May 5, 2026
    Contributor
    More actions

    Might be worth documenting in 3.15 What's New as well?

  15. hugovk commented on May 5, 2026

    @hugovk
    hugovk
    on May 5, 2026
    Member
    More actions

    Yes, I created #149398.

    Reacted by Sergey Miryanov
  16. hugovk
    added a commit that references this issue on May 5, 2026

    gh-148726: Add gc changes to What's New (#149398)

    586c97a
  17. tmeijn
    added a commit that references this issue on May 8, 2026

    build(deps): update uv to v0.11.11

    d2f8c7c
  18. hbjydev
    added a commit that references this issue on May 29, 2026

    feat(github-release): update release uv ( 0.10.9 → 0.11.17 ) (#34)

    a462067
  19. hbjydev
    added a commit that references this issue on Jun 10, 2026

    feat(github-release): update release uv ( 0.10.9 → 0.11.19 ) (#43)

    13c3e1b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @sergey-miryanov
    sergey-miryanov

Labels

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

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402503 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.