Skip to content

gh-146063: Add PyObject_CallFinalizerFromDealloc() to the limited C API#146172

Merged
vstinner merged 3 commits intopython:mainfrom
vstinner:call_finalizer
May 4, 2026
Merged

gh-146063: Add PyObject_CallFinalizerFromDealloc() to the limited C API#146172
vstinner merged 3 commits intopython:mainfrom
vstinner:call_finalizer

Conversation

@vstinner
Copy link
Copy Markdown
Member

@vstinner vstinner commented Mar 19, 2026

Add PyObject_CallFinalizer() and PyObject_CallFinalizerFromDealloc()
to the limited C API.

Add a test on PyObject_CallFinalizer().
@vstinner
Copy link
Copy Markdown
Member Author

My PR lacks PyObject_CallFinalizerFromDealloc() test which is more complicated to test.

@vstinner vstinner changed the title gh-146063: Add PyObject_CallFinalizer() to the limited C API gh-146063: Add PyObject_CallFinalizerFromDealloc() to the limited C API Mar 20, 2026
@vstinner
Copy link
Copy Markdown
Member Author

I updated the PR to only add PyObject_CallFinalizerFromDealloc() to the limited C API (leave PyObject_CallFinalizer() in the non-limited C API).

@davidhewitt
Copy link
Copy Markdown
Contributor

Gentle ping here - it'd be great to get this into 3.15 before beta freeze if possible! Thanks :)

@encukou
Copy link
Copy Markdown
Member

encukou commented Apr 15, 2026

WG vote: capi-workgroup/decisions#104

@read-the-docs-community
Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #32525579 | 📁 Comparing 40fd740 against main (1504bd6)

  🔍 Preview build  

4 files changed
± c-api/lifecycle.html
± c-api/stable.html
± whatsnew/3.15.html
± whatsnew/changelog.html

@vstinner vstinner merged commit ce51c18 into python:main May 4, 2026
58 checks passed
@vstinner vstinner deleted the call_finalizer branch May 4, 2026 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants