This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Add gc.is_finalized to check if an object has been finalised by the gc
Type: enhancement Stage: resolved
Components: Interpreter Core Versions: Python 3.9
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: pablogsal Nosy List: pablogsal
Priority: normal Keywords: patch

Created on 2020-01-13 15:17 by pablogsal, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 17989 merged pablogsal, 2020-01-13 15:19
PR 18000 merged pablogsal, 2020-01-14 17:13
Messages (3)
msg359914 - (view) Author: Pablo Galindo Salgado (pablogsal) * (Python committer) Date: 2020-01-13 15:17
Right now is not possible to check from the Python layer if an object with gc support has been already finalized by the GC (but has been resurrected). When implementing some callbacks for the gc in order to add advanced statistics, I have greatly missed a function like this to check if a certain object has been resurrected / the finalizer has been called.
msg359969 - (view) Author: Pablo Galindo Salgado (pablogsal) * (Python committer) Date: 2020-01-14 12:06
New changeset a2ec3f07f7f028ff6229d6be2a7cfbda1f4efaeb by Pablo Galindo in branch 'master':
bpo-39322: Add gc.is_finalized to check if an object has been finalised by the gc (GH-17989)
https://github.com/python/cpython/commit/a2ec3f07f7f028ff6229d6be2a7cfbda1f4efaeb
msg359983 - (view) Author: Pablo Galindo Salgado (pablogsal) * (Python committer) Date: 2020-01-14 17:38
New changeset b6791375b2ff86ea07f068fb53d9575c337eaa5b by Pablo Galindo in branch 'master':
bpo-39322: Add gc.is_finalized to the gc module docstring (GH-18000)
https://github.com/python/cpython/commit/b6791375b2ff86ea07f068fb53d9575c337eaa5b
History
Date User Action Args
2022-04-11 14:59:25adminsetgithub: 83503
2020-01-14 17:38:22pablogsalsetmessages: + msg359983
2020-01-14 17:13:22pablogsalsetpull_requests: + pull_request17404
2020-01-14 12:07:15pablogsalsetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2020-01-14 12:06:48pablogsalsetmessages: + msg359969
2020-01-13 15:19:17pablogsalsetkeywords: + patch
stage: patch review
pull_requests: + pull_request17392
2020-01-13 15:17:08pablogsalcreate