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

Backport 'Update pycrdt-websocket v0.13.0' #293 #296

Merged
merged 1 commit into from
May 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion jupyter_collaboration/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ async def _clean_room(self) -> None:
async with self._room_lock(self._room_id):
# Remove the room from the websocket server
self.log.info("Deleting Y document from memory: %s", self._room_id)
self._websocket_server.delete_room(room=self.room)
await self._websocket_server.delete_room(room=self.room)

# Clean room
del self.room
Expand Down
4 changes: 2 additions & 2 deletions jupyter_collaboration/rooms.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,13 +155,13 @@ def _emit(self, level: LogLevel, action: str | None = None, msg: str | None = No

self._logger.emit(schema_id=JUPYTER_COLLABORATION_EVENTS_URI, data=data)

def stop(self) -> None:
async def stop(self) -> None:
"""
Stop the room.

Cancels the save task and unsubscribes from the file.
"""
super().stop()
await super().stop()
# TODO: Should we cancel or wait ?
if self._saving_document:
self._saving_document.cancel()
Expand Down
2 changes: 1 addition & 1 deletion jupyter_collaboration/websocketserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ async def clean(self):
# self.log.warning(msg)
# self.log.debug("Pending tasks: %r", pending)

self.stop()
await self.stop()
tasks = []
if self.monitor_task is not None:
self.monitor_task.cancel()
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ classifiers = [
dependencies = [
"jupyter_server>=2.0.0,<3.0.0",
"jupyter_ydoc>=2.0.0,<3.0.0",
"pycrdt-websocket>=0.12.5,<0.13.0",
"pycrdt-websocket>=0.13.0,<0.14.0",
"jupyter_events>=0.10.0",
"jupyter_server_fileid>=0.7.0,<1",
"jsonschema>=4.18.0"
Expand Down
Loading