Commit 543caf6
Add a capi conversion no-op method to thrift python structs/unions
Summary: There's a generated python capi method on thrift-py3 structs to initialize from thrift python types. It's a very simple fix to add a no-op method to the base thrift python StructOrUnion class to get these unit tests to start passing now. Since the method is meant to initialize a thrift python struct with a thrift python struct, all that we need to do is return the passed in object (after a basic instance check to make sure no python shenanigans are going on).
Reviewed By: ahilger
Differential Revision: D68867840
fbshipit-source-id: 817381af3586cf7586532c6f94af676cfc16b2411 parent 411280d commit 543caf6
3 files changed
Lines changed: 13 additions & 6 deletions
File tree
- third-party/thrift/src/thrift/lib
- py3/test/auto_migrate
- python
Lines changed: 0 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
309 | 309 | | |
310 | 310 | | |
311 | 311 | | |
312 | | - | |
313 | 312 | | |
314 | 313 | | |
315 | 314 | | |
| |||
358 | 357 | | |
359 | 358 | | |
360 | 359 | | |
361 | | - | |
362 | 360 | | |
363 | 361 | | |
364 | 362 | | |
| |||
370 | 368 | | |
371 | 369 | | |
372 | 370 | | |
373 | | - | |
374 | 371 | | |
375 | 372 | | |
376 | 373 | | |
| |||
381 | 378 | | |
382 | 379 | | |
383 | 380 | | |
384 | | - | |
385 | 381 | | |
386 | 382 | | |
387 | 383 | | |
| |||
392 | 388 | | |
393 | 389 | | |
394 | 390 | | |
395 | | - | |
396 | 391 | | |
397 | 392 | | |
398 | 393 | | |
| |||
407 | 402 | | |
408 | 403 | | |
409 | 404 | | |
410 | | - | |
411 | 405 | | |
412 | 406 | | |
413 | 407 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
310 | 310 | | |
311 | 311 | | |
312 | 312 | | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
313 | 320 | | |
314 | 321 | | |
315 | 322 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1011 | 1011 | | |
1012 | 1012 | | |
1013 | 1013 | | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
1014 | 1020 | | |
1015 | 1021 | | |
1016 | 1022 | | |
| |||
0 commit comments