Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add gc.is_finalized to check if an object has been finalised by the gc #83503

Closed
pablogsal opened this issue Jan 13, 2020 · 3 comments
Closed
Assignees
Labels
3.9 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) type-feature A feature request or enhancement

Comments

@pablogsal
Copy link
Member

BPO 39322
Nosy @pablogsal
PRs
  • bpo-39322: Add gc.is_finalized to check if an object has been finalised by the gc #17989
  • bpo-39322: Add gc.is_finalized to the gc module docstring #18000
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/pablogsal'
    closed_at = <Date 2020-01-14.12:07:15.641>
    created_at = <Date 2020-01-13.15:17:08.618>
    labels = ['interpreter-core', 'type-feature', '3.9']
    title = 'Add gc.is_finalized to check if an object has been finalised by the gc'
    updated_at = <Date 2020-01-14.17:38:22.557>
    user = 'https://github.com/pablogsal'

    bugs.python.org fields:

    activity = <Date 2020-01-14.17:38:22.557>
    actor = 'pablogsal'
    assignee = 'pablogsal'
    closed = True
    closed_date = <Date 2020-01-14.12:07:15.641>
    closer = 'pablogsal'
    components = ['Interpreter Core']
    creation = <Date 2020-01-13.15:17:08.618>
    creator = 'pablogsal'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 39322
    keywords = ['patch']
    message_count = 3.0
    messages = ['359914', '359969', '359983']
    nosy_count = 1.0
    nosy_names = ['pablogsal']
    pr_nums = ['17989', '18000']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue39322'
    versions = ['Python 3.9']

    @pablogsal
    Copy link
    Member Author

    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.

    @pablogsal pablogsal added the 3.9 only security fixes label Jan 13, 2020
    @pablogsal pablogsal self-assigned this Jan 13, 2020
    @pablogsal pablogsal added interpreter-core (Objects, Python, Grammar, and Parser dirs) type-feature A feature request or enhancement 3.9 only security fixes labels Jan 13, 2020
    @pablogsal pablogsal self-assigned this Jan 13, 2020
    @pablogsal pablogsal added interpreter-core (Objects, Python, Grammar, and Parser dirs) type-feature A feature request or enhancement labels Jan 13, 2020
    @pablogsal
    Copy link
    Member Author

    New changeset a2ec3f0 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)
    a2ec3f0

    @pablogsal
    Copy link
    Member Author

    New changeset b679137 by Pablo Galindo in branch 'master':
    bpo-39322: Add gc.is_finalized to the gc module docstring (GH-18000)
    b679137

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.9 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant