Commit 8a4d5aa
authored
Fix some decoding of subsubtypes in general and std::Object in particular (#938)
I ran into a few things here:
- The object.pyx code to handle decoding to subclasses only looks
at `__subclasses__`, and so misses grandchildren types. I clearly
remember thinking about this and testing the grandchild case,
but apparently I missed something there.
- Descendants of std::Object in particular get immediately screwy,
because user-facing types don't inherit from std::Object directly,
but instead their `__shapes__` do.
- The new "`tname__` in `__shapes__`" mechanism (#926) was putting
wrong stuff in the map in some cases.
My approach is to explicitly indicate which classes should be
considered the canonical decoding classes with a `__gel_is_canonical__
= True` field on the class. And for now, I'm populating it explicitly,
though we can probably write a bunch of nasty logic to figure it out
too.1 parent 06d8a21 commit 8a4d5aa
File tree
6 files changed
+30
-43
lines changed- gel
- _internal
- _codegen/_models
- _qbmodel/_abstract
- _qb
- protocol/codecs
- tests
- dbsetup
6 files changed
+30
-43
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4358 | 4358 | | |
4359 | 4359 | | |
4360 | 4360 | | |
| 4361 | + | |
| 4362 | + | |
| 4363 | + | |
4361 | 4364 | | |
4362 | 4365 | | |
4363 | 4366 | | |
| |||
4734 | 4737 | | |
4735 | 4738 | | |
4736 | 4739 | | |
| 4740 | + | |
4737 | 4741 | | |
4738 | 4742 | | |
4739 | 4743 | | |
| |||
4746 | 4750 | | |
4747 | 4751 | | |
4748 | 4752 | | |
4749 | | - | |
4750 | | - | |
4751 | | - | |
4752 | 4753 | | |
4753 | 4754 | | |
4754 | 4755 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
38 | 43 | | |
39 | 44 | | |
40 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
| 170 | + | |
189 | 171 | | |
190 | | - | |
191 | | - | |
| 172 | + | |
192 | 173 | | |
193 | 174 | | |
| 175 | + | |
| 176 | + | |
194 | 177 | | |
195 | 178 | | |
196 | 179 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
358 | 358 | | |
359 | 359 | | |
360 | 360 | | |
361 | | - | |
362 | | - | |
363 | | - | |
364 | | - | |
365 | | - | |
366 | | - | |
367 | | - | |
368 | | - | |
369 | | - | |
370 | | - | |
371 | | - | |
372 | | - | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
373 | 371 | | |
374 | 372 | | |
| 373 | + | |
375 | 374 | | |
376 | 375 | | |
377 | 376 | | |
378 | | - | |
379 | | - | |
380 | | - | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
381 | 382 | | |
382 | 383 | | |
383 | 384 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
| 85 | + | |
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
264 | | - | |
265 | 264 | | |
266 | 265 | | |
267 | 266 | | |
| |||
1375 | 1374 | | |
1376 | 1375 | | |
1377 | 1376 | | |
1378 | | - | |
1379 | 1377 | | |
1380 | 1378 | | |
1381 | 1379 | | |
| |||
1392 | 1390 | | |
1393 | 1391 | | |
1394 | 1392 | | |
1395 | | - | |
1396 | 1393 | | |
1397 | 1394 | | |
1398 | 1395 | | |
| |||
0 commit comments