Title: gh-135552: Don't clear weakref if wr_object is a type. by nascheme · Pull Request #136151 · python/cpython · GitHub
Open Graph Title: gh-135552: Don't clear weakref if wr_object is a type. by nascheme · Pull Request #136151 · python/cpython
X Title: gh-135552: Don't clear weakref if wr_object is a type. by nascheme · Pull Request #136151 · python/cpython
Description: This is an attempt at making a fix that could be backported to old Python versions. In main, I think the best fix is to stop clearing all weakrefs in the GC. However, that seems disruptive enough that we should avoid doing so in a bugfix release. This version of the fix doesn't clear if wr_object is a type and wr_callback == NULL. There is still a small chance this would break some code that expects that weakrefs are cleared by the GC. In the unit test suite, we had test_finalization, test_io and test_gc that was broken by not clearing weakrefs. Issue: gh-135552
Open Graph Description: This is an attempt at making a fix that could be backported to old Python versions. In main, I think the best fix is to stop clearing all weakrefs in the GC. However, that seems disruptive enough...
X Description: This is an attempt at making a fix that could be backported to old Python versions. In main, I think the best fix is to stop clearing all weakrefs in the GC. However, that seems disruptive enough...
Opengraph URL: https://github.com/python/cpython/pull/136151
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:2e2bc38a-10f4-268e-5894-826c16914bac |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 8CEC:E3F0D:1396DD4:196D79B:696B1996 |
| html-safe-nonce | d2a7ec10e0db02e771c61e4552a6d9c409a6667a146b9b982af8b2b650bbf5ce |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4Q0VDOkUzRjBEOjEzOTZERDQ6MTk2RDc5Qjo2OTZCMTk5NiIsInZpc2l0b3JfaWQiOiI2NjEzMDg1NDE2NzQxMzM5MTAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 42493457c66a6b139cbb446e8bb557248ff81d4d2f33055064d2c50551179d9b |
| hovercard-subject-tag | pull_request:2630301634 |
| 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/136151/files |
| twitter:image | https://avatars.githubusercontent.com/u/690853?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/690853?s=400&v=4 |
| og:image:alt | This is an attempt at making a fix that could be backported to old Python versions. In main, I think the best fix is to stop clearing all weakrefs in the GC. However, that seems disruptive enough... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| 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 | 82560a55c6b2054555076f46e683151ee28a19bc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width