Skip to content

Commit

Permalink
Use pycrdt-websocket instead of ypy-websocket
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbrochart committed Dec 8, 2023
1 parent 102afe3 commit f5ea60f
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion docs/source/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ jupyter lab --YDocExtension.file_poll_interval=2
jupyter lab --YDocExtension.document_cleanup_delay=100

# The YStore class to use for storing Y updates (default: JupyterSQLiteYStore).
jupyter lab --YDocExtension.ystore_class=ypy_websocket.ystore.TempFileYStore
jupyter lab --YDocExtension.ystore_class=pycrdt_websocket.ystore.TempFileYStore
```
2 changes: 1 addition & 1 deletion jupyter_collaboration/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from jupyter_server.extension.application import ExtensionApp
from traitlets import Bool, Float, Type
from ypy_websocket.ystore import BaseYStore
from pycrdt_websocket.ystore import BaseYStore

from .handlers import DocSessionHandler, YDocWebSocketHandler
from .loaders import FileLoaderMapping
Expand Down
6 changes: 3 additions & 3 deletions jupyter_collaboration/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
from jupyter_ydoc import ydocs as YDOCS
from tornado import web
from tornado.websocket import WebSocketHandler
from ypy_websocket.websocket_server import YRoom
from ypy_websocket.ystore import BaseYStore
from ypy_websocket.yutils import YMessageType, write_var_uint
from pycrdt_websocket.websocket_server import YRoom
from pycrdt_websocket.ystore import BaseYStore
from pycrdt_websocket.yutils import YMessageType, write_var_uint

from .loaders import FileLoaderMapping
from .rooms import DocumentRoom, TransientRoom
Expand Down
6 changes: 3 additions & 3 deletions jupyter_collaboration/rooms.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@

from jupyter_events import EventLogger
from jupyter_ydoc import ydocs as YDOCS
from ypy_websocket.websocket_server import YRoom
from ypy_websocket.ystore import BaseYStore, YDocNotFound
from ypy_websocket.yutils import write_var_uint
from pycrdt_websocket.websocket_server import YRoom
from pycrdt_websocket.ystore import BaseYStore, YDocNotFound
from pycrdt_websocket.yutils import write_var_uint

from .loaders import FileLoader
from .utils import (
Expand Down
4 changes: 2 additions & 2 deletions jupyter_collaboration/stores.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

from traitlets import Int, Unicode
from traitlets.config import LoggingConfigurable
from ypy_websocket.ystore import SQLiteYStore as _SQLiteYStore
from ypy_websocket.ystore import TempFileYStore as _TempFileYStore
from pycrdt_websocket.ystore import SQLiteYStore as _SQLiteYStore
from pycrdt_websocket.ystore import TempFileYStore as _TempFileYStore


class TempFileYStore(_TempFileYStore):
Expand Down
4 changes: 2 additions & 2 deletions jupyter_collaboration/websocketserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
from typing import Any

from tornado.websocket import WebSocketHandler
from ypy_websocket.websocket_server import WebsocketServer, YRoom
from ypy_websocket.ystore import BaseYStore
from pycrdt_websocket.websocket_server import WebsocketServer, YRoom
from pycrdt_websocket.ystore import BaseYStore


class RoomNotFound(LookupError):
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>=1.1.0a0,<2.0.0",
"ypy-websocket>=0.12.1,<0.13.0",
"pycrdt-websocket>=0.12.5,<0.13.0",
"jupyter_events>=0.7.0",
"jupyter_server_fileid>=0.7.0,<1",
"jsonschema>=4.18.0"
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import pytest
from jupyter_ydoc import YNotebook, YUnicode
from websockets import connect
from ypy_websocket import WebsocketProvider
from pycrdt_websocket import WebsocketProvider

from jupyter_collaboration.loaders import FileLoader
from jupyter_collaboration.rooms import DocumentRoom
Expand Down
2 changes: 1 addition & 1 deletion tests/test_handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from typing import Any

from jupyter_ydoc import YUnicode
from ypy_websocket import WebsocketProvider
from pycrdt_websocket import WebsocketProvider


async def test_session_handler_should_create_session_id(
Expand Down
2 changes: 1 addition & 1 deletion tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from typing import Any

from jupyter_server import _tz as tz
from ypy_websocket.yutils import write_var_uint
from pycrdt_websocket.yutils import write_var_uint

from jupyter_collaboration.utils import RoomMessages

Expand Down

0 comments on commit f5ea60f

Please sign in to comment.