Title: Deprecate OR embrace CheckedSession also updating __dict__ · Issue #1185 · larray-project/larray · GitHub
Open Graph Title: Deprecate OR embrace CheckedSession also updating __dict__ · Issue #1185 · larray-project/larray
X Title: Deprecate OR embrace CheckedSession also updating __dict__ · Issue #1185 · larray-project/larray
Description: When working on #1168, I realized that CheckedSession has an oddity: it "forwards" all attribute writes to self.__dict__ (via object.__setattr__) in addition to self._objects, while normal Sessions do not. When reworking that code, I rem...
Open Graph Description: When working on #1168, I realized that CheckedSession has an oddity: it "forwards" all attribute writes to self.__dict__ (via object.__setattr__) in addition to self._objects, while normal Sessions...
X Description: When working on #1168, I realized that CheckedSession has an oddity: it "forwards" all attribute writes to self.__dict__ (via object.__setattr__) in addition to self._objects, while norma...
Opengraph URL: https://github.com/larray-project/larray/issues/1185
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Deprecate OR embrace CheckedSession also updating __dict__","articleBody":"When working on #1168, I realized that CheckedSession has an oddity: it \"forwards\" all attribute writes to `self.__dict__` (via `object.__setattr__`) **in addition** to `self._objects`, while normal Sessions do not.\n\nWhen reworking that code, I removed the oddity because that's *mostly* useless... All our tests passed... Until I realized yesterday by accident that the demo model relied on that (it does not crash but one of their output file is empty 😉). It uses vars(self) to get a dict of variables from a CheckedSession 😱 instead of using `.items()`. So I will revert the removal of the forwarding from my fix but I still would like to clean that up some day.\n\nUnsure if we can deprecate that cleanly. Does `__getattribute__` triggers for accessing `__dict__` via `vars()`?\n\nAn alternative to deprecating it would be to embrace that instead and store all objects **only** in `__dict__` (and remove the `_objects` dict) for both `Session` and `CheckedSession`. Unsure what would be the consequences. Would we loose the ability to store invalid python identifiers (unsure it has any value -- maybe to convert any `Array` to a `Session`)? Can we still handle `_meta`?\n\nThis is also slightly related to #1171 and should be done at the same time.","author":{"url":"https://github.com/gdementen","@type":"Person","name":"gdementen"},"datePublished":"2026-04-01T11:38:10Z","url":"https://github.com/larray-project/larray/issues/1185"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:4274bd8e-3bc4-bf6a-f077-668bf7d46857 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AC84:42D7A:1064:160E:6B0016C4 |
| html-safe-nonce | 39da59460c88347d7d9e7f51a5eb2aa2fe9f98137ae994088477fbf241639e18 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQzg0OjQyRDdBOjEwNjQ6MTYwRTo2QjAwMTZDNCIsInZpc2l0b3JfaWQiOiI2NjA3Njc5MTI3OTQ2MjcwNDA0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 7365e2905908ab5b87f96d8e5dbf7e8f34cb113d7eb736e87625f1c5882fa3c9 |
| hovercard-subject-tag | issue:4186235011 |
| github-keyboard-shortcuts | repository,issues,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/_view_fragments/issues/show/larray-project/larray/1185/issue_layout |
| twitter:image | https://opengraph.githubassets.com/aed3198aa771314c9770fadef651264a85737ddeca12da7a297c48e3a3e0d4d1/larray-project/larray/issues/1185 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/aed3198aa771314c9770fadef651264a85737ddeca12da7a297c48e3a3e0d4d1/larray-project/larray/issues/1185 |
| og:image:alt | When working on #1168, I realized that CheckedSession has an oddity: it "forwards" all attribute writes to self.__dict__ (via object.__setattr__) in addition to self._objects, while normal Sessions... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | gdementen |
| hostname | github.com |
| expected-hostname | github.com |
| None | a2dd2291b1b13cc9c06f27ec92fa3dbaf34116fc24c9347b8539db61884c59f4 |
| turbo-cache-control | no-preview |
| go-import | github.com/larray-project/larray git https://github.com/larray-project/larray.git |
| octolytics-dimension-user_id | 26460981 |
| octolytics-dimension-user_login | larray-project |
| octolytics-dimension-repository_id | 16981067 |
| octolytics-dimension-repository_nwo | larray-project/larray |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 16981067 |
| octolytics-dimension-repository_network_root_nwo | larray-project/larray |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 70121d4e855ee0bb7b75cf15d061d91f8863c0f8 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width