Title: Provide `PyExpat_CheckCompatibility` to check C API compatibility · Issue #141297 · python/cpython · GitHub
Open Graph Title: Provide `PyExpat_CheckCompatibility` to check C API compatibility · Issue #141297 · python/cpython
X Title: Provide `PyExpat_CheckCompatibility` to check C API compatibility · Issue #141297 · python/cpython
Description: Feature or enhancement Proposal: In #141259, I provide a recipe for checking compatibility of the Expat API with the one that was linked for Python. However, the recipe is quite complex and I think we should provide a minimal function th...
Open Graph Description: Feature or enhancement Proposal: In #141259, I provide a recipe for checking compatibility of the Expat API with the one that was linked for Python. However, the recipe is quite complex and I think...
X Description: Feature or enhancement Proposal: In #141259, I provide a recipe for checking compatibility of the Expat API with the one that was linked for Python. However, the recipe is quite complex and I think...
Opengraph URL: https://github.com/python/cpython/issues/141297
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Provide `PyExpat_CheckCompatibility` to check C API compatibility","articleBody":"# Feature or enhancement\n\n### Proposal:\n\nIn https://github.com/python/cpython/pull/141259, I provide a recipe for checking compatibility of the Expat API with the one that was linked for Python. However, the recipe is quite complex and I think we should provide a minimal function that checks the simple compatibility (magic number, Expat versions and structure size).\n\nThe idea is that consumers call this function but they should set the exception themselves because they might want to have other checks that are only compatible afterwards. We can also expose it as a private unstable function in case we need to change it later.\n\n### Has this already been discussed elsewhere?\n\nI have already discussed this feature proposal on Discourse\n\n### Links to previous discussion of this feature:\n\nhttps://github.com/python/cpython/pull/141259#discussion_r2507169606\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-141300\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/picnixz","@type":"Person","name":"picnixz"},"datePublished":"2025-11-09T16:08:39.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/141297/cpython/issues/141297"}
| 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:4b879f84-fd95-ad49-920f-2ef031c0df1a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B4A8:C2480:42ADC6:5D27AD:696A6AE9 |
| html-safe-nonce | 103267de6c1f4f523028f7d2f1dadd1b20c590f04b476ae88b7b654d01128ddd |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNEE4OkMyNDgwOjQyQURDNjo1RDI3QUQ6Njk2QTZBRTkiLCJ2aXNpdG9yX2lkIjoiNjI1OTI4MTcwNTk2OTU0MzkxMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 84660b8f0a789916d35c368bac649308326379677d467e60f1db893e02b00a2f |
| hovercard-subject-tag | issue:3605159464 |
| 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/141297/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5416e5319306cdb3cb87162dad1f7926e87a7864193d5c9d7a4dbcb455ee8781/python/cpython/issues/141297 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5416e5319306cdb3cb87162dad1f7926e87a7864193d5c9d7a4dbcb455ee8781/python/cpython/issues/141297 |
| og:image:alt | Feature or enhancement Proposal: In #141259, I provide a recipe for checking compatibility of the Expat API with the one that was linked for Python. However, the recipe is quite complex and I think... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | picnixz |
| 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