Title: gh-143969: Fix frozen+slotted dataclass __setattr__ crash ambiguity by dawdameet · Pull Request #143971 · python/cpython · GitHub
Open Graph Title: gh-143969: Fix frozen+slotted dataclass __setattr__ crash ambiguity by dawdameet · Pull Request #143971 · python/cpython
X Title: gh-143969: Fix frozen+slotted dataclass __setattr__ crash ambiguity by dawdameet · Pull Request #143971 · python/cpython
Description: Fixed Misleading "Not an instance or subtype" error when assigning to property of frozen, slotted dataclass. Fix a crash in frozen dataclasses with slots where the generated setattr and delattr methods used super(cls, self). When slots rebuild the class, the captured cls no longer matches the instance type, causing a TypeError at runtime. Use object.setattr and object.delattr instead to preserve frozen semantics safely. gh-143969
Open Graph Description: Fixed Misleading "Not an instance or subtype" error when assigning to property of frozen, slotted dataclass. Fix a crash in frozen dataclasses with slots where the generated setattr and d...
X Description: Fixed Misleading "Not an instance or subtype" error when assigning to property of frozen, slotted dataclass. Fix a crash in frozen dataclasses with slots where the generated setat...
Opengraph URL: https://github.com/python/cpython/pull/143971
X: @github
Domain: patch-diff.githubusercontent.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:665592ce-3d18-3920-4076-acfe9e4ac9ed |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 82C2:2CE7C1:862B0A0:B090DF0:696DE600 |
| html-safe-nonce | fa59c50d603072d62fbc1b7f071e0f057180803dba0bbb86912d2f9910da3287 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MkMyOjJDRTdDMTo4NjJCMEEwOkIwOTBERjA6Njk2REU2MDAiLCJ2aXNpdG9yX2lkIjoiMjgzNTI5NDQxNDIyMzMwNDE5MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 1ccabd97b662443af7f6fc3c5a199531dd985d6f8ba7095b80a3d190caaa7ed4 |
| hovercard-subject-tag | pull_request:3184344689 |
| 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/143971/files |
| twitter:image | https://avatars.githubusercontent.com/u/94282163?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/94282163?s=400&v=4 |
| og:image:alt | Fixed Misleading "Not an instance or subtype" error when assigning to property of frozen, slotted dataclass. Fix a crash in frozen dataclasses with slots where the generated setattr and d... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4922b452d03cd8dbce479d866a11bc25b59ef6ee2da23aa9b0ddefa6bd4d0064 |
| 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 full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7e5ae23c70136152637ceee8d6faceb35596ec46 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width