Title: Deprecate PyObject_SetAttr(obj, name, NULL): PyObject_DelAttr(obj, name) must be used instead · Issue #106572 · python/cpython · GitHub
Open Graph Title: Deprecate PyObject_SetAttr(obj, name, NULL): PyObject_DelAttr(obj, name) must be used instead · Issue #106572 · python/cpython
X Title: Deprecate PyObject_SetAttr(obj, name, NULL): PyObject_DelAttr(obj, name) must be used instead · Issue #106572 · python/cpython
Description: When PyObject_SetAttr() is called with a NULL value, it's unclear if the caller wants to remove the attribute on purpose, or if the value is NULL because of an error. Such API is error prone and should be avoided. In 2005, this feature w...
Open Graph Description: When PyObject_SetAttr() is called with a NULL value, it's unclear if the caller wants to remove the attribute on purpose, or if the value is NULL because of an error. Such API is error prone and sh...
X Description: When PyObject_SetAttr() is called with a NULL value, it's unclear if the caller wants to remove the attribute on purpose, or if the value is NULL because of an error. Such API is error prone an...
Opengraph URL: https://github.com/python/cpython/issues/106572
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Deprecate PyObject_SetAttr(obj, name, NULL): PyObject_DelAttr(obj, name) must be used instead","articleBody":"When ``PyObject_SetAttr()`` is called with a ``NULL`` value, it's unclear if the caller wants to remove the attribute on purpose, or if the value is ``NULL`` because of an error. Such API is error prone and should be avoided.\r\n\r\nIn 2005, this feature was already deprecated in the documentation in issue #69887 by commit 45be8d67be0083c923ca31e4803de861177a2383.\r\n\r\nI propose to now emit a DeprecationWarning and schedule the removal of this feature in Python 3.15. If too many C extensions rely on this current behavior, we can consider removing the feature later.\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-106573\n* gh-106611\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/vstinner","@type":"Person","name":"vstinner"},"datePublished":"2023-07-09T15:59:05.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/106572/cpython/issues/106572"}
| 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:ac431293-93f9-5748-46cf-8323991446b6 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 84F8:1E4FEF:A3E8F0:D312F9:696AF7F7 |
| html-safe-nonce | ccd94290670f82cdd06758954c851fde33eaf1a5f77c1193173935ac0e3d9564 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NEY4OjFFNEZFRjpBM0U4RjA6RDMxMkY5OjY5NkFGN0Y3IiwidmlzaXRvcl9pZCI6IjY3ODA5NTEyODU2MDAwMjQ1NjciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | af954e8fd96e3ffa6631ca93e6432a6424a5c28ed16773a6f93dbf3e1f744da6 |
| hovercard-subject-tag | issue:1795460453 |
| 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/106572/issue_layout |
| twitter:image | https://opengraph.githubassets.com/3603971b11170248e0fd507947b346be5bf0e393e5a68def85768a01dee2fdd6/python/cpython/issues/106572 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/3603971b11170248e0fd507947b346be5bf0e393e5a68def85768a01dee2fdd6/python/cpython/issues/106572 |
| og:image:alt | When PyObject_SetAttr() is called with a NULL value, it's unclear if the caller wants to remove the attribute on purpose, or if the value is NULL because of an error. Such API is error prone and sh... |
| 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 | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| 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 | 82560a55c6b2054555076f46e683151ee28a19bc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width