Title: Eliminate redundant refcounting in the JIT for `LOAD_ATTR_MODULE` · Issue #143995 · python/cpython · GitHub
Open Graph Title: Eliminate redundant refcounting in the JIT for `LOAD_ATTR_MODULE` · Issue #143995 · python/cpython
X Title: Eliminate redundant refcounting in the JIT for `LOAD_ATTR_MODULE` · Issue #143995 · python/cpython
Description: Feature or enhancement Proposal: As a follow-up to #134584, we can eliminate redundant ref-counting for LOAD_ATTR_MODULE. Note that if a module is imported globally (as is most commonly done, at the top of a file), attribute access via L...
Open Graph Description: Feature or enhancement Proposal: As a follow-up to #134584, we can eliminate redundant ref-counting for LOAD_ATTR_MODULE. Note that if a module is imported globally (as is most commonly done, at th...
X Description: Feature or enhancement Proposal: As a follow-up to #134584, we can eliminate redundant ref-counting for LOAD_ATTR_MODULE. Note that if a module is imported globally (as is most commonly done, at th...
Opengraph URL: https://github.com/python/cpython/issues/143995
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Eliminate redundant refcounting in the JIT for `LOAD_ATTR_MODULE`","articleBody":"# Feature or enhancement\n\n### Proposal:\n\nAs a follow-up to https://github.com/python/cpython/issues/134584, we can eliminate redundant ref-counting for `LOAD_ATTR_MODULE`.\n\nNote that if a module is imported globally (as is most commonly done, at the top of a file), attribute access via `LOAD_ATTR_MODULE` may be optimized into a constant load. Therefore, this optimization only applies when a module is imported locally, for example, within a function.\n\n### Has this already been discussed elsewhere?\n\nThis is a minor feature, which does not need previous discussion elsewhere\n\n### Links to previous discussion of this feature:\n\n_No response_\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-143996\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/aisk","@type":"Person","name":"aisk"},"datePublished":"2026-01-18T13:16:32.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/143995/cpython/issues/143995"}
| 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:2a7491df-4e60-7dfe-5ba1-d9ed60c67d51 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A3BE:28FB08:2DF6E:3B9B5:696EC0D7 |
| html-safe-nonce | cca4ff9b7f82b55cb0b1fea9490aa7a0788b2b2c0aa075c0f9c92ee0b981ccbf |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBM0JFOjI4RkIwODoyREY2RTozQjlCNTo2OTZFQzBENyIsInZpc2l0b3JfaWQiOiI4NDE2NTg0MDQ4NjQwNDQyNTgzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 8930bf4983cff2d38760c576a928d2d44f8b65d76cb534f107c08dc3af2bdf82 |
| hovercard-subject-tag | issue:3826773587 |
| 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/143995/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f27c01473392eeffa26327428bddb13bf8824a41e4e26ace0ff96e1950d1a83c/python/cpython/issues/143995 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f27c01473392eeffa26327428bddb13bf8824a41e4e26ace0ff96e1950d1a83c/python/cpython/issues/143995 |
| og:image:alt | Feature or enhancement Proposal: As a follow-up to #134584, we can eliminate redundant ref-counting for LOAD_ATTR_MODULE. Note that if a module is imported globally (as is most commonly done, at th... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | aisk |
| hostname | github.com |
| expected-hostname | github.com |
| None | b278ad162d35332b6de714dfb005de04386c4d92df6475522bef910f491a35ee |
| 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 | 39aed5006635ab6f45e6b77d23e73b08a00272a3 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width