Title: [3.15] gh-148587: Make sys.lazy_modules match PEP and keep internal lazy submodules tra… by DinoV · Pull Request #150014 · python/cpython · GitHub
Open Graph Title: [3.15] gh-148587: Make sys.lazy_modules match PEP and keep internal lazy submodules tra… by DinoV · Pull Request #150014 · python/cpython
X Title: [3.15] gh-148587: Make sys.lazy_modules match PEP and keep internal lazy submodules tra… by DinoV · Pull Request #150014 · python/cpython
Description: The PEP initially set sys.lazy_modules was to be a set of the lazily imported things. At some point it seemed that having our internal tracking for publishing submodules to parent modules when they're imported could be combined with this. But this means that data the interpreter is making decisions on is now immutable. This goes back to having a separate set for the lazy modules which is user visible but has no impact on how lazy imports are evaluated or executed. This is one possible approach - another one would be to make it a function and calculate the set and return it per-call. Then it would be backed by our normal internal data. We could also make it a function and keep tracking both sets of data as this PR does and then that'd give us the ability in the future to lazily calculate the data. Issue: gh-148587
Open Graph Description: The PEP initially set sys.lazy_modules was to be a set of the lazily imported things. At some point it seemed that having our internal tracking for publishing submodules to parent modules when they...
X Description: The PEP initially set sys.lazy_modules was to be a set of the lazily imported things. At some point it seemed that having our internal tracking for publishing submodules to parent modules when they...
Opengraph URL: https://github.com/python/cpython/pull/150014
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:dcf9e829-3a59-002b-5768-499a84f06004 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | C748:26C890:B2D3B6:F57FAD:6A55BA6C |
| html-safe-nonce | 078e6a5925a8e73442e8ae36ba5b9152f1a7ea2d873f268c24536bdf7fd6b4e2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNzQ4OjI2Qzg5MDpCMkQzQjY6RjU3RkFEOjZBNTVCQTZDIiwidmlzaXRvcl9pZCI6Ijg3Njc1MjMzODY4NzAzMTU2MjgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 9880a454aaeb96c6380c73eba9575ccecab67941d63582dd581d2a048129c70d |
| hovercard-subject-tag | pull_request:3704000843 |
| 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/150014/files |
| twitter:image | https://avatars.githubusercontent.com/u/320265?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/320265?s=400&v=4 |
| og:image:alt | The PEP initially set sys.lazy_modules was to be a set of the lazily imported things. At some point it seemed that having our internal tracking for publishing submodules to parent modules when they... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b5665c84831ed9ac4fb79519c16c9c5580ba8092fb8bb6e3e72972ec7197348e |
| 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 | 64b9ae238e18eb87ead1f9fe37a7cc81d67d85aa |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width