Skip to content

Commit e7caaa9

Browse files
committed
Backport 'Update pycrdt-websocket v0.13.0' jupyterlab#293
1 parent b49bc4f commit e7caaa9

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

jupyter_collaboration/handlers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ async def _clean_room(self) -> None:
340340
async with self._room_lock(self._room_id):
341341
# Remove the room from the websocket server
342342
self.log.info("Deleting Y document from memory: %s", self._room_id)
343-
self._websocket_server.delete_room(room=self.room)
343+
await self._websocket_server.delete_room(room=self.room)
344344

345345
# Clean room
346346
del self.room

jupyter_collaboration/rooms.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,13 +155,13 @@ def _emit(self, level: LogLevel, action: str | None = None, msg: str | None = No
155155

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

158-
def stop(self) -> None:
158+
async def stop(self) -> None:
159159
"""
160160
Stop the room.
161161
162162
Cancels the save task and unsubscribes from the file.
163163
"""
164-
super().stop()
164+
await super().stop()
165165
# TODO: Should we cancel or wait ?
166166
if self._saving_document:
167167
self._saving_document.cancel()

jupyter_collaboration/websocketserver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ async def clean(self):
5858
# self.log.warning(msg)
5959
# self.log.debug("Pending tasks: %r", pending)
6060

61-
self.stop()
61+
await self.stop()
6262
tasks = []
6363
if self.monitor_task is not None:
6464
self.monitor_task.cancel()

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ classifiers = [
2929
dependencies = [
3030
"jupyter_server>=2.0.0,<3.0.0",
3131
"jupyter_ydoc>=2.0.0,<3.0.0",
32-
"pycrdt-websocket>=0.12.5,<0.13.0",
32+
"pycrdt-websocket>=0.13.0,<0.14.0",
3333
"jupyter_events>=0.10.0",
3434
"jupyter_server_fileid>=0.7.0,<1",
3535
"jsonschema>=4.18.0"

0 commit comments

Comments
 (0)