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 — `tp_dealloc` example may need the trashcan for GC container types · Issue #158619 · python/cpython

tp_dealloc example may need the trashcan for GC container types #158619

New issue
Copy link
New issue
Copy link
Open
Open
tp_dealloc example may need the trashcan for GC container types#158619
Copy link
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dirpendingThe issue will be closed if no feedback is providedThe issue will be closed if no feedback is provided

Description

@aeroyorch
aeroyorch
opened on Oct 2, 2026
Issue body actions

Documentation

The tp_dealloc Complete Example has no trashcan, and calls PyObject_CallFinalizerFromDealloc() before anything else. A GC type whose instances can reference other instances of the same type recurses without bound if it follows that shape.

Since the macros Py_TRASHCAN_BEGIN / Py_TRASHCAN_END are not in the C API reference at all, that example is the natural thing to copy for a new GC type. Would a note there make sense, or is the trashcan deliberately out of scope for the ref docs? It is also not clear to me whether gh-124715 and gh-132280 already solve this from 3.14 on.

Activity

  1. aeroyorch
    added
    docsDocumentation in the Doc dirDocumentation in the Doc dir
    on Oct 2, 2026
  2. github-project-automation
    added this to docs issueson Oct 2, 2026
  3. sergey-miryanov commented on Oct 2, 2026

    @sergey-miryanov
    sergey-miryanov
    on Oct 2, 2026
    Contributor
    More actions

    Trashcan is an implementation detail, so I don't think we need to document it. Py_TRASHCAN_BEGIN and Py_TRASHCAN_END were kept for backward compatibility.

  4. picnixz
    added
    pendingThe issue will be closed if no feedback is providedThe issue will be closed if no feedback is provided
    on Oct 3, 2026
  5. yummyPancake2607 commented on Oct 4, 2026

    @yummyPancake2607
    yummyPancake2607
    on Oct 4, 2026
    More actions

    i would like to work on this issue if no one is working on it

  6. kevinprimeraquecreo-stack
    added this to Project_VKon Oct 18, 2026
  7. github-project-automation
    moved this to Todo in Project_VKon Oct 18, 2026
  8. kevinprimeraquecreo-stack
    added this to Project_VKon Oct 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dirDocumentation in the Doc dirpendingThe issue will be closed if no feedback is providedThe issue will be closed if no feedback is provided

    Projects

    • docs issues
      Status
      Todo
      Show more project fields

    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.