Title: [C API] Change `PyTypeObject.tp_flags` type to `uint64_t` · Issue #161562 · python/cpython · GitHub
Open Graph Title: [C API] Change `PyTypeObject.tp_flags` type to `uint64_t` · Issue #161562 · python/cpython
X Title: [C API] Change `PyTypeObject.tp_flags` type to `uint64_t` · Issue #161562 · python/cpython
Description: Feature or enhancement Currently, PyTypeObject.tp_flags type is unsigned long which is 32-bit on Windows and 32-bit platforms. There are less and less available type flags: https://docs.python.org/3/c-api/typeobj.html#c.PyTypeObject.tp_f...
Open Graph Description: Feature or enhancement Currently, PyTypeObject.tp_flags type is unsigned long which is 32-bit on Windows and 32-bit platforms. There are less and less available type flags: https://docs.python.org/...
X Description: Feature or enhancement Currently, PyTypeObject.tp_flags type is unsigned long which is 32-bit on Windows and 32-bit platforms. There are less and less available type flags: https://docs.python.org/...
Opengraph URL: https://github.com/python/cpython/issues/161562
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[C API] Change `PyTypeObject.tp_flags` type to `uint64_t`","articleBody":"### Feature or enhancement\n\nCurrently, `PyTypeObject.tp_flags` type is `unsigned long` which is 32-bit on Windows and 32-bit platforms. There are less and less available type flags: https://docs.python.org/3/c-api/typeobj.html#c.PyTypeObject.tp_flags.\n\nI propose extending `PyTypeObject.tp_flags` to `uint64_t` to get 32 additional flags.\n\n### Has this already been discussed elsewhere?\n\nI have already discussed this feature proposal on Discourse\n\n### Links to previous discussion of this feature:\n\nThe issue was discussed at [We’re out of type flags, let’s add new API for new ones](https://discuss.python.org/t/were-out-of-type-flags-lets-add-new-api-for-new-ones/108540).\n\n\u003c!-- gh-linked-prs -->\n### Linked PRs\n* gh-161565\n\u003c!-- /gh-linked-prs -->\n","author":{"url":"https://github.com/vstinner","@type":"Person","name":"vstinner"},"datePublished":"2026-11-07T16:11:08Z","url":"https://github.com/python/cpython/issues/161562"}
| 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:da96100f-4c05-bb0c-b74e-14464477796a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 81E4:2F543F:18C0EE3:20B7EB7:6B020F88 |
| html-safe-nonce | 8515d7e87a47b833e684b02a13f1d8d1b64dd9780f23f4f83a134278eed9b10d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MUU0OjJGNTQzRjoxOEMwRUUzOjIwQjdFQjc6NkIwMjBGODgiLCJ2aXNpdG9yX2lkIjoiNTgwMTY2ODU5OTAzNjAyNTY4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 126d15c17a2f570f3b8c364889185b53607c24f204f1a8639ad0d5a9f3ddc6f8 |
| hovercard-subject-tag | issue:6261300276 |
| 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/161562/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d5fee7a427250419f683e52ab3f0053053956244d2c77139d32f4cefbae28282/python/cpython/issues/161562 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d5fee7a427250419f683e52ab3f0053053956244d2c77139d32f4cefbae28282/python/cpython/issues/161562 |
| og:image:alt | Feature or enhancement Currently, PyTypeObject.tp_flags type is unsigned long which is 32-bit on Windows and 32-bit platforms. There are less and less available type flags: https://docs.python.org/... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | vstinner |
| 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