Skip to content

Commit

Permalink
Update pycrdt-websocket v0.13.0 (jupyterlab#293)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbrochart authored Apr 29, 2024
1 parent adcde32 commit 926c4d0
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,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 projects/jupyter-server-ydoc/jupyter_server_ydoc/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
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 projects/jupyter-server-ydoc/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ authors = [
dependencies = [
"jupyter_server>=2.4.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

0 comments on commit 926c4d0

Please sign in to comment.