Title: We have run out of flags bits in `PyTypeObject`'s `tp_flags` · Issue #134860 · python/cpython · GitHub
Open Graph Title: We have run out of flags bits in `PyTypeObject`'s `tp_flags` · Issue #134860 · python/cpython
X Title: We have run out of flags bits in `PyTypeObject`'s `tp_flags` · Issue #134860 · python/cpython
Description: PyTypeObject's tp_flags field is defined as an unsigned long. In effect this means that we have only 32 bits we can use for flags. We have already used all 32 of them. Bits 15 and 16 are reserved for Stackless Python. Since Stackless Pyt...
Open Graph Description: PyTypeObject's tp_flags field is defined as an unsigned long. In effect this means that we have only 32 bits we can use for flags. We have already used all 32 of them. Bits 15 and 16 are reserved f...
X Description: PyTypeObject's tp_flags field is defined as an unsigned long. In effect this means that we have only 32 bits we can use for flags. We have already used all 32 of them. Bits 15 and 16 are reserv...
Opengraph URL: https://github.com/python/cpython/issues/134860
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"We have run out of flags bits in `PyTypeObject`'s `tp_flags`","articleBody":"`PyTypeObject`'s `tp_flags` field is defined as an `unsigned long`. In effect this means that we have only 32 bits we can use for flags. We have already used all 32 of them.\n\nBits 15 and 16 are reserved for Stackless Python. Since Stackless Python is pining for the fjords, we could recycle those two bits. However that's not going to last long with likely changes necessary for parallelism and performance.\n\nAny change to `PyTypeObject` breaks both API and ABI, but that's OK because:\n* Adding a field or changing the size of a field is a backwards compatible API change.\n* The existence of `PyTypeObject` is part of the stable ABI, but its layout is not.\n\nThe cleanest change, IMO, is to change `unsigned long tp_flags` to `uint64_t tp_flags` which gives us another 32 bits, which should last many more years.\n","author":{"url":"https://github.com/markshannon","@type":"Person","name":"markshannon"},"datePublished":"2025-05-28T18:16:57Z","url":"https://github.com/python/cpython/issues/134860"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| 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:2cd0ac6c-5060-b527-33a8-514368ab0e4b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E5A8:34DB8F:33D5809:45464B8:6B02097E |
| html-safe-nonce | c2742d626e9db8a056c72173014709c380f2204ec1b73ecd49839ecd1290e0eb |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNUE4OjM0REI4RjozM0Q1ODA5OjQ1NDY0Qjg6NkIwMjA5N0UiLCJ2aXNpdG9yX2lkIjoiNTcwNDI5ODI2ODM2ODk2Mzk2NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 33b231c48d2c4ad18581d23078da93acfb3df1f51070a50bbfd5b5cbe87af71a |
| hovercard-subject-tag | issue:3098176692 |
| 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/134860/issue_layout |
| twitter:image | https://opengraph.githubassets.com/082eab8e61c86a926a2e8c05d69bf1a6c69cc175144e12b1b63e49a0aa424128/python/cpython/issues/134860 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/082eab8e61c86a926a2e8c05d69bf1a6c69cc175144e12b1b63e49a0aa424128/python/cpython/issues/134860 |
| og:image:alt | PyTypeObject's tp_flags field is defined as an unsigned long. In effect this means that we have only 32 bits we can use for flags. We have already used all 32 of them. Bits 15 and 16 are reserved f... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | markshannon |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| 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 | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width