Title: gh-127271: Remove the PyCell_Get usage for framelocalsproxy by gaogaotiantian · Pull Request #130383 · python/cpython · GitHub
Open Graph Title: gh-127271: Remove the PyCell_Get usage for framelocalsproxy by gaogaotiantian · Pull Request #130383 · python/cpython
X Title: gh-127271: Remove the PyCell_Get usage for framelocalsproxy by gaogaotiantian · Pull Request #130383 · python/cpython
Description: In #127272 a PyCell_Get usage in frameobject.c was missed from being replaced for free-threaded safety. I guess the reason was probably the function was labelled to return a borrowed reference and a deeper understanding of the piece of code is needed to make that change. (or maybe I'm just thinking too much and it just slipped away :)) I made the change to use PyCell_GetRef and changed the function to return a new reference (because otherwise it won't be safe in free-threaded build). However, there are a few places in the code where it does not care about the actual value stored, it only cares whether such value exists - so I added a util function to avoid having Py_XDECREFs all around the code. Issue: gh-127271
Open Graph Description: In #127272 a PyCell_Get usage in frameobject.c was missed from being replaced for free-threaded safety. I guess the reason was probably the function was labelled to return a borrowed reference and ...
X Description: In #127272 a PyCell_Get usage in frameobject.c was missed from being replaced for free-threaded safety. I guess the reason was probably the function was labelled to return a borrowed reference and ...
Opengraph URL: https://github.com/python/cpython/pull/130383
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:6624d274-ce35-ff7b-0e0f-5f5d262492aa |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 9C0C:2FB483:2405EB0:3450C20:6A565ABF |
| html-safe-nonce | 8eccb8faa9c13382490d3cc4ef40b05a2a5c3d63c5b8b4cf26cd4272c6bd6058 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QzBDOjJGQjQ4MzoyNDA1RUIwOjM0NTBDMjA6NkE1NjVBQkYiLCJ2aXNpdG9yX2lkIjoiNjY1NTQ5MjkyMDA3NzM0MzQyMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 04ba8ff375699fd94e4d57c2dd73295ce6254e24da6e4e68d2855f1b3da03557 |
| hovercard-subject-tag | pull_request:2348206704 |
| 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/130383/files |
| twitter:image | https://avatars.githubusercontent.com/u/13121107?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/13121107?s=400&v=4 |
| og:image:alt | In #127272 a PyCell_Get usage in frameobject.c was missed from being replaced for free-threaded safety. I guess the reason was probably the function was labelled to return a borrowed reference and ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 6a3afe34dff341ad10912db44becf282289d7f2af20576241738530fbb28de01 |
| 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 | b71002134df95575e9f6c2945a64d454b0be181e |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width