Title: [3.9] bpo-44050: Extension modules can share state when they don't support sub-interpreters. (GH-27794) by ambv · Pull Request #28741 · python/cpython · GitHub
Open Graph Title: [3.9] bpo-44050: Extension modules can share state when they don't support sub-interpreters. (GH-27794) by ambv · Pull Request #28741 · python/cpython
X Title: [3.9] bpo-44050: Extension modules can share state when they don't support sub-interpreters. (GH-27794) by ambv · Pull Request #28741 · python/cpython
Description: (cherry picked from commit b9bb748) Co-authored-by: Hai Shi shihai1992@gmail.com Note: this is a little different from 3.10 and 3.11 because in 3.10+ _Py_IsMainInterpreter takes PyInterpreterState instead of the entire PyThreadState as an argument (see GH-24577 for that). Also, the new test uses PyModule_AddObjectRef which was only added in Python 3.10 (see GH-23122). I replaced this usage with the old PyModule_AddObject with additional increfs and decrefs per what BPO-42327 prescribes. https://bugs.python.org/issue44050
Open Graph Description: (cherry picked from commit b9bb748) Co-authored-by: Hai Shi shihai1992@gmail.com Note: this is a little different from 3.10 and 3.11 because in 3.10+ _Py_IsMainInterpreter takes PyInterpreterState ...
X Description: (cherry picked from commit b9bb748) Co-authored-by: Hai Shi shihai1992@gmail.com Note: this is a little different from 3.10 and 3.11 because in 3.10+ _Py_IsMainInterpreter takes PyInterpreterState ...
Opengraph URL: https://github.com/python/cpython/pull/28741
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:1fdeda32-3fd1-e8a3-c809-1baca7a28417 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | E904:3A6082:1021516:14D13A8:696B0FE9 |
| html-safe-nonce | fe54819f53a19ce3e7826a006243a7c752245a4659dc405eff4d8d4cb9a44511 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFOTA0OjNBNjA4MjoxMDIxNTE2OjE0RDEzQTg6Njk2QjBGRTkiLCJ2aXNpdG9yX2lkIjoiODk4MjM0MDQyODE4MTk5OTU5MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 17a2955b861e4ae897643be7771bad51cd23b44b718b2b9583acb5e23ad69fe4 |
| hovercard-subject-tag | pull_request:750047784 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,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/python/cpython/pull/28741/files |
| twitter:image | https://avatars.githubusercontent.com/u/55281?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/55281?s=400&v=4 |
| og:image:alt | (cherry picked from commit b9bb748) Co-authored-by: Hai Shi shihai1992@gmail.com Note: this is a little different from 3.10 and 3.11 because in 3.10+ _Py_IsMainInterpreter takes PyInterpreterState ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| turbo-cache-control | no-preview |
| diff-view | unified |
| 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 full-width |
| disable-turbo | true |
| 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