Title: C API: Add PyWeakref_GetRef() function · Issue #105927 · python/cpython · GitHub
Open Graph Title: C API: Add PyWeakref_GetRef() function · Issue #105927 · python/cpython
X Title: C API: Add PyWeakref_GetRef() function · Issue #105927 · python/cpython
Description: PyWeakref_GET_OBJECT() and PyWeakref_GetObject() return a borrowed reference to the object, or a borrowed reference to None if the object has been finalized. This API is error-prone and not easy to use. This API was discussed in 2016: ht...
Open Graph Description: PyWeakref_GET_OBJECT() and PyWeakref_GetObject() return a borrowed reference to the object, or a borrowed reference to None if the object has been finalized. This API is error-prone and not easy to...
X Description: PyWeakref_GET_OBJECT() and PyWeakref_GetObject() return a borrowed reference to the object, or a borrowed reference to None if the object has been finalized. This API is error-prone and not easy to...
Opengraph URL: https://github.com/python/cpython/issues/105927
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"C API: Add PyWeakref_GetRef() function","articleBody":"PyWeakref_GET_OBJECT() and PyWeakref_GetObject() return a borrowed reference to the object, or a borrowed reference to None if the object has been finalized. This API is error-prone and not easy to use.\r\n\r\nThis API was discussed in 2016: https://mail.python.org/archives/list/python-dev@python.org/thread/6BIPI4MCMAZFLJNIZB4JLTBW2COCACQQ/\r\n\r\nI propose adding a new PyWeakref_GetRef() C API function which returns a new strong reference to the object, or NULL if the object has been finalized.\r\n\r\n\u003c!-- gh-linked-prs --\u003e\r\n### Linked PRs\r\n* gh-105928\r\n* gh-105929\r\n* gh-105932\r\n* gh-105961\r\n* gh-105963\r\n* gh-105964\r\n* gh-105965\r\n* gh-105966\r\n* gh-105971\r\n* gh-105992\r\n* gh-105997\r\n* gh-106001\r\n* gh-106002\r\n* gh-106006\r\n* gh-106007\r\n* gh-106561\n* gh-117091\n\u003c!-- /gh-linked-prs --\u003e\r\n","author":{"url":"https://github.com/vstinner","@type":"Person","name":"vstinner"},"datePublished":"2023-06-19T22:13:54.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":17},"url":"https://github.com/105927/cpython/issues/105927"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:9a730398-c0cd-86c0-518b-3129ed601998 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E812:11169F:61DADF:81C444:696AAFDF |
| html-safe-nonce | 16237347636c3ea36f26251c43ca62c79a75a9bfb9d1e58df634e60619fc33ae |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFODEyOjExMTY5Rjo2MURBREY6ODFDNDQ0OjY5NkFBRkRGIiwidmlzaXRvcl9pZCI6Ijc0MDM3NjI3MjY5NTkxMDA3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 9669dc02ade95d7a406da6c1bf0f0922e483db674c5f5d1f8b50e221cdbc458a |
| hovercard-subject-tag | issue:1764293800 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/105927/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4cfcbb7ea0825d1e37bfa462b3765c7cc3a45555cf25284897aa9590cd353ae7/python/cpython/issues/105927 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4cfcbb7ea0825d1e37bfa462b3765c7cc3a45555cf25284897aa9590cd353ae7/python/cpython/issues/105927 |
| og:image:alt | PyWeakref_GET_OBJECT() and PyWeakref_GetObject() return a borrowed reference to the object, or a borrowed reference to None if the object has been finalized. This API is error-prone and not easy to... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | vstinner |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4fa1799b6a53c2d30c950d74230781bef9e7f61138c72c7727e4b83f0743752b |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 41f276818bd204c4a30a0281fb3c576298d9474c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width