Title: Raise PyType_Modified on split key insertion to avoid cached keys version check · Issue #150490 · python/cpython · GitHub
Open Graph Title: Raise PyType_Modified on split key insertion to avoid cached keys version check · Issue #150490 · python/cpython
X Title: Raise PyType_Modified on split key insertion to avoid cached keys version check · Issue #150490 · python/cpython
Description: Feature or enhancement Proposal: When we insert into a split dictionary we update the shared keys version - this is used to invalidate caches for loading methods and loading class values and requires us to check the keys version. Instead...
Open Graph Description: Feature or enhancement Proposal: When we insert into a split dictionary we update the shared keys version - this is used to invalidate caches for loading methods and loading class values and requir...
X Description: Feature or enhancement Proposal: When we insert into a split dictionary we update the shared keys version - this is used to invalidate caches for loading methods and loading class values and requir...
Opengraph URL: https://github.com/python/cpython/issues/150490
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Raise PyType_Modified on split key insertion to avoid cached keys version check","articleBody":"# Feature or enhancement\n\n### Proposal:\n\nWhen we insert into a split dictionary we update the shared keys version - this is used to invalidate caches for loading methods and loading class values and requires us to check the keys version. Instead we can raise PyType_Modified which lets us rely on the type version check + has inline values check instead of validating that we have the correct keys version. This gets rid of loading the cached keys version, the objects type (although likely the compiler eliminates this already), loading the cached keys from the type, and then loading the keys version and comparing it against the cached value.\n\n### Has this already been discussed elsewhere?\n\nNo response given\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-150489\n* gh-152914\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/DinoV","@type":"Person","name":"DinoV"},"datePublished":"2026-05-26T18:05:49.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/150490/cpython/issues/150490"}
| 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:6f904910-180e-c6d0-0e2a-e51bb7d11efd |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C5EC:13AD7A:1624563:1E21C6D:6A508DAC |
| html-safe-nonce | c35b35705ce8c328d9fed372f68620f8305614104eb673fc876fa8e84f7864b6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNUVDOjEzQUQ3QToxNjI0NTYzOjFFMjFDNkQ6NkE1MDhEQUMiLCJ2aXNpdG9yX2lkIjoiNDc2MDI0OTA5Nzg5MzQ4MTkwMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | f57aba0514c45a853db3e72398f287fdb5e5788b0d9f830905472309cda359e9 |
| hovercard-subject-tag | issue:4526368821 |
| 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/150490/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c11c8d16264623b79f3420636af4f7cd8dbd18a1c38049310fc9c9768a9fec02/python/cpython/issues/150490 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c11c8d16264623b79f3420636af4f7cd8dbd18a1c38049310fc9c9768a9fec02/python/cpython/issues/150490 |
| og:image:alt | Feature or enhancement Proposal: When we insert into a split dictionary we update the shared keys version - this is used to invalidate caches for loading methods and loading class values and requir... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | DinoV |
| hostname | github.com |
| expected-hostname | github.com |
| None | d6dc8294eb500fa36bbc57472d61fe87c522f9c3c1d64f70f4926f66a66a7efb |
| 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 | 7ac0ad2f2c7e4b9056617355fd9e33e22b0c8df9 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width