Commit 2f295cd
committed
Handle async do_complete.
A number of methods of ipykernel can optinally return `awaitable[T]`
instead of just `T`, this is the case for `do_complete`.
I think it's a mistake ; see ipython/ipykernel#1295 ; in particular
because it's easy to forget / hard to properly type-check, and I'd like
to make it mandatory in the long term to have await.
Spyder seem to not handle the case where do_completer return an
awaitable (or more partiularly is `do_complete` is a coroutine function.
This tries to handle it – and as of course `do_completer` _can_ be
async, all caller _must_ be async. So I try to do all the required
updates.
Note: I also add explict imports in some test, to get better error
message in case those deps are not installed.1 parent 4e554db commit 2f295cd
File tree
3 files changed
+14
-8
lines changed- spyder_kernels
- console/tests
- customize
- utils/tests
3 files changed
+14
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
875 | 875 | | |
876 | 876 | | |
877 | 877 | | |
878 | | - | |
| 878 | + | |
879 | 879 | | |
880 | 880 | | |
881 | 881 | | |
882 | 882 | | |
883 | 883 | | |
884 | 884 | | |
| 885 | + | |
| 886 | + | |
885 | 887 | | |
886 | 888 | | |
887 | 889 | | |
| |||
890 | 892 | | |
891 | 893 | | |
892 | 894 | | |
| 895 | + | |
| 896 | + | |
893 | 897 | | |
894 | 898 | | |
895 | 899 | | |
| |||
1390 | 1394 | | |
1391 | 1395 | | |
1392 | 1396 | | |
| 1397 | + | |
1393 | 1398 | | |
1394 | 1399 | | |
1395 | 1400 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
351 | 351 | | |
352 | 352 | | |
353 | 353 | | |
354 | | - | |
| 354 | + | |
355 | 355 | | |
356 | 356 | | |
357 | 357 | | |
358 | 358 | | |
359 | | - | |
| 359 | + | |
360 | 360 | | |
361 | | - | |
| 361 | + | |
362 | 362 | | |
363 | | - | |
| 363 | + | |
364 | 364 | | |
365 | 365 | | |
366 | 366 | | |
| |||
422 | 422 | | |
423 | 423 | | |
424 | 424 | | |
425 | | - | |
| 425 | + | |
426 | 426 | | |
427 | 427 | | |
428 | 428 | | |
| |||
450 | 450 | | |
451 | 451 | | |
452 | 452 | | |
453 | | - | |
| 453 | + | |
454 | 454 | | |
455 | 455 | | |
456 | 456 | | |
| |||
529 | 529 | | |
530 | 530 | | |
531 | 531 | | |
532 | | - | |
| 532 | + | |
533 | 533 | | |
534 | 534 | | |
535 | 535 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
342 | 342 | | |
343 | 343 | | |
344 | 344 | | |
| 345 | + | |
345 | 346 | | |
346 | 347 | | |
347 | 348 | | |
| |||
0 commit comments