Skip to content

Commit 1a35090

Browse files
committed
Test changing base method to async after ipython#1295
This is not meant to be released in 7.0 finale but iss used as a test that: - 1. Our test suite is working is eferything is async - 2. I'like to think of making a canary release (alpha, or beta) with something similar to get feedback from what we break upstream.
1 parent 6aeb2b2 commit 1a35090

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

ipykernel/kernelbase.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -794,7 +794,7 @@ async def execute_request(self, socket, ident, parent):
794794
self._aborted_time = time.monotonic()
795795
self.log.info("Aborting queue")
796796

797-
def do_execute(
797+
async def do_execute(
798798
self,
799799
code,
800800
silent,
@@ -829,7 +829,7 @@ async def complete_request(self, socket, ident, parent):
829829
matches = json_clean(matches)
830830
self.session.send(socket, "complete_reply", matches, parent, ident)
831831

832-
def do_complete(self, code, cursor_pos):
832+
async def do_complete(self, code, cursor_pos):
833833
"""Override in subclasses to find completions."""
834834
return {
835835
"matches": [],
@@ -865,7 +865,7 @@ async def inspect_request(self, socket, ident, parent):
865865
msg = self.session.send(socket, "inspect_reply", reply_content, parent, ident)
866866
self.log.debug("%s", msg)
867867

868-
def do_inspect(self, code, cursor_pos, detail_level=0, omit_sections=()):
868+
async def do_inspect(self, code, cursor_pos, detail_level=0, omit_sections=()):
869869
"""Override in subclasses to allow introspection."""
870870
return {"status": "ok", "data": {}, "metadata": {}, "found": False}
871871

@@ -889,7 +889,7 @@ async def history_request(self, socket, ident, parent):
889889
msg = self.session.send(socket, "history_reply", reply_content, parent, ident)
890890
self.log.debug("%s", msg)
891891

892-
def do_history(
892+
async def do_history(
893893
self,
894894
hist_access_type,
895895
output,
@@ -1020,7 +1020,7 @@ async def shutdown_request(self, socket, ident, parent):
10201020

10211021
self.stop()
10221022

1023-
def do_shutdown(self, restart):
1023+
async def do_shutdown(self, restart):
10241024
"""Override in subclasses to do things when the frontend shuts down the
10251025
kernel.
10261026
"""
@@ -1046,7 +1046,7 @@ async def is_complete_request(self, socket, ident, parent):
10461046
reply_msg = self.session.send(socket, "is_complete_reply", reply_content, parent, ident)
10471047
self.log.debug("%s", reply_msg)
10481048

1049-
def do_is_complete(self, code):
1049+
async def do_is_complete(self, code):
10501050
"""Override in subclasses to find completions."""
10511051
return {"status": "unknown"}
10521052

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ filterwarnings= [
192192
"ignore:unclosed database in <sqlite3.Connection:ResourceWarning",
193193

194194
# ignore deprecated non async during tests:
195-
"always:For consistency across implementations, it is recommended that:PendingDeprecationWarning",
195+
"error:For consistency across implementations, it is recommended that:PendingDeprecationWarning",
196196

197197
]
198198

0 commit comments

Comments
 (0)