Title: gh-116946: fully implement GC protocol for `bz2` objects by picnixz · Pull Request #138266 · python/cpython · GitHub
Open Graph Title: gh-116946: fully implement GC protocol for `bz2` objects by picnixz · Pull Request #138266 · python/cpython
X Title: gh-116946: fully implement GC protocol for `bz2` objects by picnixz · Pull Request #138266 · python/cpython
Description: AFAIU, tp_traverse will not be called if Py_TPFLAGS_HAVE_GC is not specified. Quoting the specs: Instances of heap-allocated types hold a reference to their type. Their traversal function must therefore either visit Py_TYPE(self), or delegate this responsibility by calling tp_traverse of another heap-allocated type (such as a heap-allocated superclass). If they do not, the type object may not be garbage-collected. As such, I believe that this is the correct fix (that is, we need tp_traverse to be called). cc @vstinner Issue: gh-116946
Open Graph Description: AFAIU, tp_traverse will not be called if Py_TPFLAGS_HAVE_GC is not specified. Quoting the specs: Instances of heap-allocated types hold a reference to their type. Their traversal function must the...
X Description: AFAIU, tp_traverse will not be called if Py_TPFLAGS_HAVE_GC is not specified. Quoting the specs: Instances of heap-allocated types hold a reference to their type. Their traversal function must the...
Opengraph URL: https://github.com/python/cpython/pull/138266
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:62aad7b3-7875-8937-4c5a-137309d9191d |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | D13C:1E1D6F:40F5AB:5A7B3B:696A7553 |
| html-safe-nonce | 3ba9fff8a693a7b0c9b07ed26f1f76df251192b729628f07a459b317c62297ac |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMTNDOjFFMUQ2Rjo0MEY1QUI6NUE3QjNCOjY5NkE3NTUzIiwidmlzaXRvcl9pZCI6IjI5MjM2NTkyMjE2OTQ4MzgwOTkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 8f801ae665a6b8b17959275d9aad317d53ad911b4e2d2ea30204aadb69466a61 |
| hovercard-subject-tag | pull_request:2786835278 |
| 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/138266/files |
| twitter:image | https://avatars.githubusercontent.com/u/10796600?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/10796600?s=400&v=4 |
| og:image:alt | AFAIU, tp_traverse will not be called if Py_TPFLAGS_HAVE_GC is not specified. Quoting the specs: Instances of heap-allocated types hold a reference to their type. Their traversal function must the... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | cfa223d62d272274e0b68350b4bd7741f3ca7498b8c4b8b1bc1e6deabbdbc09d |
| 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 | 6a0b6893c221f98f607598e939299fdf5763435d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width