Title: [C API] Py_mod_multiple_interpreters Added to Limited C API Without Versioning · Issue #111698 · python/cpython · GitHub
Open Graph Title: [C API] Py_mod_multiple_interpreters Added to Limited C API Without Versioning · Issue #111698 · python/cpython
X Title: [C API] Py_mod_multiple_interpreters Added to Limited C API Without Versioning · Issue #111698 · python/cpython
Description: Bug report (See #110968 (comment).) When I added Py_mod_multiple_interpreters1 to Include/moduleobject.h, I forgot to restrict the limited API version in which it should be there. The fix should be something similar to what we did in gh-...
Open Graph Description: Bug report (See #110968 (comment).) When I added Py_mod_multiple_interpreters1 to Include/moduleobject.h, I forgot to restrict the limited API version in which it should be there. The fix should be...
X Description: Bug report (See #110968 (comment).) When I added Py_mod_multiple_interpreters1 to Include/moduleobject.h, I forgot to restrict the limited API version in which it should be there. The fix should be...
Opengraph URL: https://github.com/python/cpython/issues/111698
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[C API] Py_mod_multiple_interpreters Added to Limited C API Without Versioning","articleBody":"# Bug report\n\n(See https://github.com/python/cpython/issues/110968#issuecomment-1766504893.)\n\nWhen I added `Py_mod_multiple_interpreters`[^1] to Include/moduleobject.h, I forgot to restrict the limited API version in which it should be there.\n\n[^1]: I added `Py_mod_multiple_interpreters` in [gh-104148](https://github.com/python/cpython/pull/104148) (1c420e138fd828895b6bd3c44ef99156e8796095), along with some pre-defined values (e.g. `Py_MOD_MULTIPLE_INTERPRETERS_SUPPORTED`). The direct motivation was to make an implicit contract in [PEP 489](https://peps.python.org/pep-0489/) (i.e. \"must support subinterpreters\") explicit. (See [gh-104108](https://github.com/python/cpython/issues/104108).) The indirect motivation was [PEP 684](https://peps.python.org/pep-0684/).\n\nThe fix should be something similar to what we did in [gh-110969](https://github.com/python/cpython/pull/110969), combined with [gh-111584](https://github.com/python/cpython/pull/111584). We will need to backport the change to 3.12.\n\nBasically, the change would be something like:\n\n```diff\n- #define Py_mod_multiple_interpreters 3\n+ #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 \u003e= 0x030c0000\n+ # define Py_mod_multiple_interpreters 3\n+ #endif\n```\n\nFYI, gh-110968 already dealt with the same issue for the pre-defined slot values (e.g. `Py_MOD_MULTIPLE_INTERPRETERS_SUPPORTED`).\n\nCC @encukou, @vstinner\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-111707\n* gh-111787\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/ericsnowcurrently","@type":"Person","name":"ericsnowcurrently"},"datePublished":"2023-11-03T16:04:35.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/111698/cpython/issues/111698"}
| 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:f15fabc5-b4dd-16c0-a043-3f69a9c2bec3 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C502:11D37A:EED5F8:14FFAF3:696A2902 |
| html-safe-nonce | 42ab7b3933b72454bed99c401792ff7903a60e8436c75e2bb4dd94073621a49e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNTAyOjExRDM3QTpFRUQ1Rjg6MTRGRkFGMzo2OTZBMjkwMiIsInZpc2l0b3JfaWQiOiI5MDg3NTQwOTIzMzM4NDY3NTg2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 980ec57711aeba1e8af2f02ebc564c6f95ed2aa83a4f298742a145b3f9370eba |
| hovercard-subject-tag | issue:1976508903 |
| 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/111698/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5c80b3a03a007adb1ce74c535725c28ad8c0119023e793947c758b9d9d496313/python/cpython/issues/111698 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5c80b3a03a007adb1ce74c535725c28ad8c0119023e793947c758b9d9d496313/python/cpython/issues/111698 |
| og:image:alt | Bug report (See #110968 (comment).) When I added Py_mod_multiple_interpreters1 to Include/moduleobject.h, I forgot to restrict the limited API version in which it should be there. The fix should be... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ericsnowcurrently |
| hostname | github.com |
| expected-hostname | github.com |
| None | a1022f03e4f0d91ea173e4e5dac892c982e0588c62f1ce56121d755a320a3569 |
| 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 | f472b8e6c7b3fdd5d0354972a3f4c516289bf0be |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width