Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test changing base method to async after #1295 #1339

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update more requests
  • Loading branch information
Carreau committed Feb 18, 2025
commit 7eb56212bfe99d3d8eca586bb8e0a863fee9b53d
10 changes: 5 additions & 5 deletions ipykernel/ipkernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ async def run(execution: Execution) -> None:

return reply_content

def do_complete(self, code, cursor_pos):
async def do_complete(self, code, cursor_pos):
"""Handle code completion."""
if _use_experimental_60_completion and self.use_experimental_completions:
return self._experimental_do_complete(code, cursor_pos)
Expand Down Expand Up @@ -567,7 +567,7 @@ def _experimental_do_complete(self, code, cursor_pos):
"status": "ok",
}

def do_inspect(self, code, cursor_pos, detail_level=0, omit_sections=()):
async def do_inspect(self, code, cursor_pos, detail_level=0, omit_sections=()):
"""Handle code inspection."""
name = token_at_cursor(code, cursor_pos)

Expand Down Expand Up @@ -595,7 +595,7 @@ def do_inspect(self, code, cursor_pos, detail_level=0, omit_sections=()):

return reply_content

def do_history(
async def do_history(
self,
hist_access_type,
output,
Expand Down Expand Up @@ -631,13 +631,13 @@ def do_history(
"history": list(hist),
}

def do_shutdown(self, restart):
async def do_shutdown(self, restart):
"""Handle kernel shutdown."""
if self.shell:
self.shell.exit_now = True
return dict(status="ok", restart=restart)

def do_is_complete(self, code):
async def do_is_complete(self, code):
"""Handle an is_complete request."""
transformer_manager = getattr(self.shell, "input_transformer_manager", None)
if transformer_manager is None:
Expand Down
1 change: 1 addition & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ def destroy(self):
@no_type_check
async def test_shell_message(self, *args, **kwargs):
msg_list = self._prep_msg(*args, **kwargs)
print(msg_list)
await self.process_shell_message(msg_list)
receive_stream: MemoryObjectReceiveStream[Any] = self.session._streams[self.shell_socket][
"receive"
Expand Down
Loading