62
62
" either be a coroutine function (`async def`) or return an awaitable object"
63
63
" (like an `asyncio.Future`). It might become a requirement in the future."
64
64
" Coroutine functions and awaitables have been supported since"
65
- " ipykernel 6.0 (2021)."
65
+ " ipykernel 6.0 (2021). {target} does not seem to return an awaitable "
66
66
)
67
67
68
68
@@ -752,7 +752,9 @@ async def execute_request(self, socket, ident, parent):
752
752
reply_content = await reply_content
753
753
else :
754
754
warnings .warn (
755
- _AWAITABLE_MESSAGE .format (func_name = "execute_request" ),
755
+ _AWAITABLE_MESSAGE .format (
756
+ func_name = "do_execute" , target = self .do_execute
757
+ ),
756
758
PendingDeprecationWarning ,
757
759
stacklevel = 1 ,
758
760
)
@@ -818,7 +820,9 @@ async def complete_request(self, socket, ident, parent):
818
820
matches = await matches
819
821
else :
820
822
warnings .warn (
821
- _AWAITABLE_MESSAGE .format (func_name = "do_complete" ),
823
+ _AWAITABLE_MESSAGE .format (
824
+ func_name = "do_complete" , target = self .do_complete
825
+ ),
822
826
PendingDeprecationWarning ,
823
827
stacklevel = 1 ,
824
828
)
@@ -852,7 +856,9 @@ async def inspect_request(self, socket, ident, parent):
852
856
reply_content = await reply_content
853
857
else :
854
858
warnings .warn (
855
- _AWAITABLE_MESSAGE .format (func_name = "do_inspect" ),
859
+ _AWAITABLE_MESSAGE .format (
860
+ func_name = "do_inspect" , target = self .do_inspect
861
+ ),
856
862
PendingDeprecationWarning ,
857
863
stacklevel = 1 ,
858
864
)
@@ -877,7 +883,9 @@ async def history_request(self, socket, ident, parent):
877
883
reply_content = await reply_content
878
884
else :
879
885
warnings .warn (
880
- _AWAITABLE_MESSAGE .format (func_name = "do_history" ),
886
+ _AWAITABLE_MESSAGE .format (
887
+ func_name = "do_history" , target = self .do_history
888
+ ),
881
889
PendingDeprecationWarning ,
882
890
stacklevel = 1 ,
883
891
)
@@ -1000,7 +1008,9 @@ async def shutdown_request(self, socket, ident, parent):
1000
1008
content = await content
1001
1009
else :
1002
1010
warnings .warn (
1003
- _AWAITABLE_MESSAGE .format (func_name = "do_shutdown" ),
1011
+ _AWAITABLE_MESSAGE .format (
1012
+ func_name = "do_shutdown" , target = self .do_shutdown
1013
+ ),
1004
1014
PendingDeprecationWarning ,
1005
1015
stacklevel = 1 ,
1006
1016
)
@@ -1030,7 +1040,9 @@ async def is_complete_request(self, socket, ident, parent):
1030
1040
reply_content = await reply_content
1031
1041
else :
1032
1042
warnings .warn (
1033
- _AWAITABLE_MESSAGE .format (func_name = "do_is_complete" ),
1043
+ _AWAITABLE_MESSAGE .format (
1044
+ func_name = "do_is_complete" , target = self .do_is_complete
1045
+ ),
1034
1046
PendingDeprecationWarning ,
1035
1047
stacklevel = 1 ,
1036
1048
)
@@ -1052,7 +1064,7 @@ async def debug_request(self, socket, ident, parent):
1052
1064
reply_content = await reply_content
1053
1065
else :
1054
1066
warnings .warn (
1055
- _AWAITABLE_MESSAGE .format (func_name = "do_debug_request" ),
1067
+ _AWAITABLE_MESSAGE .format (func_name = "do_debug_request" , self . do_debug_request ),
1056
1068
PendingDeprecationWarning ,
1057
1069
stacklevel = 1 ,
1058
1070
)
0 commit comments