Skip to content

C API: Add PyWeakref_GetRef() function #105927

Description

@vstinner

Activity

  1. erlend-aasland commented on Jun 19, 2023

    @erlend-aasland
    Contributor

    [...] or NULL if the object has been finalized.

    With an error set? If no, would you need to call PyErr_Occurred() to find out if an error has occurred? See also capi-workgroup/problems#1

  2. added 7 commits that reference this issue on Jun 19, 2023
  3. vstinner commented on Jun 20, 2023

    @vstinner
    MemberAuthor

    With an error set? If no, would you need to call PyErr_Occurred() to find out if an error has occurred? See also capi-workgroup/problems#1

    No error is set. See PR #105929 for the first part of the implementation.

  4. added 3 commits that reference this issue on Jun 20, 2023
  5. erlend-aasland commented on Jun 20, 2023

    @erlend-aasland
    Contributor

    No error is set. See PR #105929 for the first part of the implementation.

    Would it be better to return None if the object has been finalized? The idiom is that APIs returning a PyObject pointer only will return NULL in case of error.

  6. 45 remaining items

  7. added a commit that references this issue on Jun 23, 2023
  8. added a commit that references this issue on Jun 23, 2023
  9. added a commit that references this issue on Jun 26, 2023
  10. added a commit that references this issue on Jun 26, 2023
  11. vstinner commented on Jun 27, 2023

    @vstinner
    MemberAuthor

    Oh, PEP 703 – Making the Global Interpreter Lock Optional in CPython proposes PyWeakref_FetchObject() which is more or less the PyWeakref_GetRef() function that was just added to Python 3.13.

  12. vstinner commented on Jun 30, 2023

    @vstinner
    MemberAuthor

    I added PyWeakref_GetRef() functions and deprecated PyWeakref_GetObject() and PyWeakref_GET_OBJECT() functions. I close the issue.

  13. added 2 commits that reference this issue on Jul 9, 2023
  14. added 2 commits that reference this issue on Mar 20, 2024
  15. added a commit that references this issue on Mar 25, 2024
  16. added a commit that references this issue on Apr 17, 2024
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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions