Title: gh-102660: Fix is_core_module() by ericsnowcurrently · Pull Request #103257 · python/cpython · GitHub
Open Graph Title: gh-102660: Fix is_core_module() by ericsnowcurrently · Pull Request #103257 · python/cpython
X Title: gh-102660: Fix is_core_module() by ericsnowcurrently · Pull Request #103257 · python/cpython
Description: In gh-102744 we added is_core_module() (in Python/import.c), which relies on 'get_core_module_dict()(also added in that PR). The problem is that_PyImport_FixupBuiltin(), which ultimately calls is_core_module(), is called on the builtins module before interp->builtins_copyis set. Consequently, the builtins module isn't considered a "core" module while it is getting "fixed up" and its module defm_copy` get set. Under isolated interpreters this causes problems since sys and builtins are allowed even though they are still single-phase init modules. (This was discovered while working on gh-101660.) The solution is to stop relying on get_core_module_dict() in is_core_module(). Issue: gh-102660
Open Graph Description: In gh-102744 we added is_core_module() (in Python/import.c), which relies on 'get_core_module_dict()(also added in that PR). The problem is that_PyImport_FixupBuiltin(), which ultimately calls...
X Description: In gh-102744 we added is_core_module() (in Python/import.c), which relies on 'get_core_module_dict()(also added in that PR). The problem is that_PyImport_FixupBuiltin(), which ultimately c...
Opengraph URL: https://github.com/python/cpython/pull/103257
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:a6529bc3-522a-2573-6eaf-b2e84d23c8b6 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | CED4:146FD0:2E5B22:411CE4:696A1DBD |
| html-safe-nonce | f0b6881b942ed8eee5f4f5a34851b19bd98d143579cd72346c9f5fd48a790c89 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRUQ0OjE0NkZEMDoyRTVCMjI6NDExQ0U0OjY5NkExREJEIiwidmlzaXRvcl9pZCI6IjY3MDA1OTY0ODA0NjYwOTk2NDUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | e2bf18d82cfc43b68f8bafffb20808fb574560a9ded82cdf08d6127fae688e42 |
| hovercard-subject-tag | pull_request:1302357677 |
| 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/103257/files |
| twitter:image | https://avatars.githubusercontent.com/u/1152074?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/1152074?s=400&v=4 |
| og:image:alt | In gh-102744 we added is_core_module() (in Python/import.c), which relies on 'get_core_module_dict()(also added in that PR). The problem is that_PyImport_FixupBuiltin(), which ultimately calls... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 014f3d193f36b7d393f88ca22d06fbacd370800b40a547c1ea67291e02dc8ea3 |
| 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 |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | d515f6f09fa57a93bf90355cb894eb84ca4f458f |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width