Title: Deprecation of PyException_HEAD · Issue #142410 · python/cpython · GitHub
Open Graph Title: Deprecation of PyException_HEAD · Issue #142410 · python/cpython
X Title: Deprecation of PyException_HEAD · Issue #142410 · python/cpython
Description: Summary This issue proposes the depreciation of the PyException_HEAD macro. During review of PR #141522 (Document PyException_HEAD), the reviewers indicated that this macro is internal, should not be documented, and should instead be dep...
Open Graph Description: Summary This issue proposes the depreciation of the PyException_HEAD macro. During review of PR #141522 (Document PyException_HEAD), the reviewers indicated that this macro is internal, should not ...
X Description: Summary This issue proposes the depreciation of the PyException_HEAD macro. During review of PR #141522 (Document PyException_HEAD), the reviewers indicated that this macro is internal, should not ...
Opengraph URL: https://github.com/python/cpython/issues/142410
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Deprecation of PyException_HEAD","articleBody":"## Summary\n\nThis issue proposes the depreciation of the `PyException_HEAD` macro.\n\nDuring review of PR #141522 (Document PyException_HEAD), the reviewers indicated that\nthis macro is internal, should not be documented, and should instead be deprecated.\n\n- `PyException_HEAD` is an internal macro used in CPython to define exception types.\n- It is not part of the public C API and was never intended to be used externally.\n- However, a small number of external projects have copied this pattern (for example,\n confluent_kafka).\n- If there are some internals change in the future (e.g. for PEP 697), this macro will\n create a maintenance burden.\n\nThis deprecation would allow external projects time to migrate, rather than breaking\nthem immediately.\n\n## Proposed actions\n\n- Marking the macro as deprecated in the header using `Py_DEPRECATED()` or a\n compiler warning.\n- We can also add the documentation note stating that the macro is deprecated and may be\n removed in a future release.\n- We can add a NEWS entry.\n- Recommending that new code use exception creation patterns compatible with PEP 697.\n\nNo behavior change or removal is proposed at this time.\n\n## CC\n\n@ZeroIntensity\n@vstinner\n@StanFromIreland\n\n\n\n### Has this already been discussed elsewhere?\n\nThis has been discussed in one of the closed pr #141522\n\n### Links to previous discussion of this feature:\n\n\u003chttps://github.com/python/cpython/pull/141522\u003e","author":{"url":"https://github.com/Krishna-web-hub","@type":"Person","name":"Krishna-web-hub"},"datePublished":"2025-12-08T09:30:59.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":8},"url":"https://github.com/142410/cpython/issues/142410"}
| 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:83152f1f-77ff-a46d-96c9-ace9d0854382 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B79E:165BE9:14FF71:1D8904:696A6C39 |
| html-safe-nonce | f077b6385073e4fd2dae8ae4645d37cd382a364e72349604147857c289b575df |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNzlFOjE2NUJFOToxNEZGNzE6MUQ4OTA0OjY5NkE2QzM5IiwidmlzaXRvcl9pZCI6IjQwNjI5MjgzOTgzOTQ2MDQwOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | fc0f77ee2615d4755fddff15799120d4962fc57fe896643aa3cb8c6122d1ed02 |
| hovercard-subject-tag | issue:3705490145 |
| 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/142410/issue_layout |
| twitter:image | https://opengraph.githubassets.com/13ff2de1095c572536061cb01ed1381f37d4173907114f58a8679b83222ea113/python/cpython/issues/142410 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/13ff2de1095c572536061cb01ed1381f37d4173907114f58a8679b83222ea113/python/cpython/issues/142410 |
| og:image:alt | Summary This issue proposes the depreciation of the PyException_HEAD macro. During review of PR #141522 (Document PyException_HEAD), the reviewers indicated that this macro is internal, should not ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Krishna-web-hub |
| hostname | github.com |
| expected-hostname | github.com |
| None | 6fea32d5b7276b841b7a803796d9715bc6cfb31ed549fdf9de2948ac25d12ba6 |
| 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 | f2d9f6432a5a115ec709295ae70623f33bb80aee |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width