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
Next Next commit
Test changing base method to async after #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.
  • Loading branch information
Carreau committed Feb 17, 2025
commit 1a3509074e9e729bb81cf86fbb2d54467dbc4e78
12 changes: 6 additions & 6 deletions ipykernel/kernelbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,7 @@ async def execute_request(self, socket, ident, parent):
self._aborted_time = time.monotonic()
self.log.info("Aborting queue")

def do_execute(
async def do_execute(
self,
code,
silent,
Expand Down Expand Up @@ -829,7 +829,7 @@ async def complete_request(self, socket, ident, parent):
matches = json_clean(matches)
self.session.send(socket, "complete_reply", matches, parent, ident)

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

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=()):
"""Override in subclasses to allow introspection."""
return {"status": "ok", "data": {}, "metadata": {}, "found": False}

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

def do_history(
async def do_history(
self,
hist_access_type,
output,
Expand Down Expand Up @@ -1020,7 +1020,7 @@ async def shutdown_request(self, socket, ident, parent):

self.stop()

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

def do_is_complete(self, code):
async def do_is_complete(self, code):
"""Override in subclasses to find completions."""
return {"status": "unknown"}

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ filterwarnings= [
"ignore:unclosed database in <sqlite3.Connection:ResourceWarning",

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

]

Expand Down
Loading