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

Use pycrdt-websocket instead of ypy-websocket #220

Merged
merged 1 commit into from
Dec 12, 2023
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 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 @@ -5,8 +5,8 @@
import asyncio

from jupyter_server.extension.application import ExtensionApp
from pycrdt_websocket.ystore import BaseYStore
from traitlets import Bool, Float, Type
from ypy_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 @@ -12,11 +12,11 @@
from jupyter_server.auth import authorized
from jupyter_server.base.handlers import APIHandler, JupyterHandler
from jupyter_ydoc import ydocs as YDOCS
from pycrdt_websocket.websocket_server import YRoom
from pycrdt_websocket.ystore import BaseYStore
from pycrdt_websocket.yutils import YMessageType, write_var_uint
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 .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
@@ -1,10 +1,10 @@
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.

from pycrdt_websocket.ystore import SQLiteYStore as _SQLiteYStore
from pycrdt_websocket.ystore import TempFileYStore as _TempFileYStore
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


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 @@ -7,9 +7,9 @@
from logging import Logger
from typing import Any

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


class RoomNotFound(LookupError):
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ 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",
"jupyter_ydoc>=2.0.0,<3.0.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 @@ -10,8 +10,8 @@
import nbformat
import pytest
from jupyter_ydoc import YNotebook, YUnicode
from pycrdt_websocket import WebsocketProvider
from websockets import connect
from ypy_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
Loading