Title: bpo-40217: Ensure Py_VISIT(Py_TYPE(self)) is always called for PyType_FromSpec types by pablogsal · Pull Request #19414 · python/cpython · GitHub
Open Graph Title: bpo-40217: Ensure Py_VISIT(Py_TYPE(self)) is always called for PyType_FromSpec types by pablogsal · Pull Request #19414 · python/cpython
X Title: bpo-40217: Ensure Py_VISIT(Py_TYPE(self)) is always called for PyType_FromSpec types by pablogsal · Pull Request #19414 · python/cpython
Description: https://bugs.python.org/issue40217 Types created by PyType_FromSpec own a strong reference to their type, but this was added in Python 3.8. The tp_traverse function needs to call Py_VISIT on the type but all existing traverse functions cannot be updated (especially the ones from existing user functions) so we need to provide a tp_traverse that manually calls Py_VISIT(Py_TYPE(self)) and then call the provided tp_traverse. In this way, user functions do not need to be updated, preserve backwards compatibility. To do this, we store the user-provided traverse function at the end of the type (we need to allocate space for it) so we can call it from our PyType_FromSpec_tp_traverse wrapper.
Open Graph Description: https://bugs.python.org/issue40217 Types created by PyType_FromSpec own a strong reference to their type, but this was added in Python 3.8. The tp_traverse function needs to call Py_VISIT on the t...
X Description: https://bugs.python.org/issue40217 Types created by PyType_FromSpec own a strong reference to their type, but this was added in Python 3.8. The tp_traverse function needs to call Py_VISIT on the t...
Opengraph URL: https://github.com/python/cpython/pull/19414
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:2f73c39a-51a4-614f-832a-07a31461d219 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 9B56:2F0D9B:28840D:398712:696A1C85 |
| html-safe-nonce | 9f233967b9de3141f23b5bd01e7dcdecd7efc183f5e8c4ed106ce4dc2c2567ff |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QjU2OjJGMEQ5QjoyODg0MEQ6Mzk4NzEyOjY5NkExQzg1IiwidmlzaXRvcl9pZCI6Ijg5MDA0MDg3Njg3NTUwMTQ3ODkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 44034e26ef85a147e94d7dfdffe9fcc783fa969fd2d8905568a81217f2e195a9 |
| hovercard-subject-tag | pull_request:400452679 |
| 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/19414/files |
| twitter:image | https://avatars.githubusercontent.com/u/11718525?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/11718525?s=400&v=4 |
| og:image:alt | https://bugs.python.org/issue40217 Types created by PyType_FromSpec own a strong reference to their type, but this was added in Python 3.8. The tp_traverse function needs to call Py_VISIT on the t... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 014f3d193f36b7d393f88ca22d06fbacd370800b40a547c1ea67291e02dc8ea3 |
| 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 |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | d515f6f09fa57a93bf90355cb894eb84ca4f458f |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width