jupyter-server-ydoc 1.1.0rc0__tar.gz → 2.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {jupyter_server_ydoc-1.1.0rc0 → jupyter_server_ydoc-2.0.0}/PKG-INFO +6 -5
- jupyter_server_ydoc-2.0.0/jupyter_server_ydoc/_version.py +1 -0
- {jupyter_server_ydoc-1.1.0rc0 → jupyter_server_ydoc-2.0.0}/jupyter_server_ydoc/events/awareness.yaml +1 -1
- {jupyter_server_ydoc-1.1.0rc0 → jupyter_server_ydoc-2.0.0}/jupyter_server_ydoc/events/fork.yaml +1 -1
- {jupyter_server_ydoc-1.1.0rc0 → jupyter_server_ydoc-2.0.0}/jupyter_server_ydoc/events/session.yaml +1 -1
- {jupyter_server_ydoc-1.1.0rc0 → jupyter_server_ydoc-2.0.0}/jupyter_server_ydoc/handlers.py +10 -2
- {jupyter_server_ydoc-1.1.0rc0 → jupyter_server_ydoc-2.0.0}/jupyter_server_ydoc/loaders.py +3 -0
- {jupyter_server_ydoc-1.1.0rc0 → jupyter_server_ydoc-2.0.0}/jupyter_server_ydoc/pytest_plugin.py +5 -2
- {jupyter_server_ydoc-1.1.0rc0 → jupyter_server_ydoc-2.0.0}/pyproject.toml +3 -3
- {jupyter_server_ydoc-1.1.0rc0 → jupyter_server_ydoc-2.0.0}/tests/test_rooms.py +3 -1
- jupyter_server_ydoc-1.1.0rc0/jupyter_server_ydoc/_version.py +0 -1
- {jupyter_server_ydoc-1.1.0rc0 → jupyter_server_ydoc-2.0.0}/.gitignore +0 -0
- {jupyter_server_ydoc-1.1.0rc0 → jupyter_server_ydoc-2.0.0}/LICENSE +0 -0
- {jupyter_server_ydoc-1.1.0rc0 → jupyter_server_ydoc-2.0.0}/README.md +0 -0
- {jupyter_server_ydoc-1.1.0rc0 → jupyter_server_ydoc-2.0.0}/jupyter-config/jupyter_server_ydoc.json +0 -0
- {jupyter_server_ydoc-1.1.0rc0 → jupyter_server_ydoc-2.0.0}/jupyter_server_ydoc/__init__.py +0 -0
- {jupyter_server_ydoc-1.1.0rc0 → jupyter_server_ydoc-2.0.0}/jupyter_server_ydoc/app.py +0 -0
- {jupyter_server_ydoc-1.1.0rc0 → jupyter_server_ydoc-2.0.0}/jupyter_server_ydoc/rooms.py +0 -0
- {jupyter_server_ydoc-1.1.0rc0 → jupyter_server_ydoc-2.0.0}/jupyter_server_ydoc/stores.py +0 -0
- {jupyter_server_ydoc-1.1.0rc0 → jupyter_server_ydoc-2.0.0}/jupyter_server_ydoc/test_utils.py +0 -0
- {jupyter_server_ydoc-1.1.0rc0 → jupyter_server_ydoc-2.0.0}/jupyter_server_ydoc/utils.py +0 -0
- {jupyter_server_ydoc-1.1.0rc0 → jupyter_server_ydoc-2.0.0}/jupyter_server_ydoc/websocketserver.py +0 -0
- {jupyter_server_ydoc-1.1.0rc0 → jupyter_server_ydoc-2.0.0}/setup.py +0 -0
- {jupyter_server_ydoc-1.1.0rc0 → jupyter_server_ydoc-2.0.0}/tests/__init__.py +0 -0
- {jupyter_server_ydoc-1.1.0rc0 → jupyter_server_ydoc-2.0.0}/tests/conftest.py +0 -0
- {jupyter_server_ydoc-1.1.0rc0 → jupyter_server_ydoc-2.0.0}/tests/test_app.py +0 -0
- {jupyter_server_ydoc-1.1.0rc0 → jupyter_server_ydoc-2.0.0}/tests/test_documents.py +0 -0
- {jupyter_server_ydoc-1.1.0rc0 → jupyter_server_ydoc-2.0.0}/tests/test_handlers.py +0 -0
- {jupyter_server_ydoc-1.1.0rc0 → jupyter_server_ydoc-2.0.0}/tests/test_loaders.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: jupyter-server-ydoc
|
|
3
|
-
Version:
|
|
3
|
+
Version: 2.0.0
|
|
4
4
|
Summary: jupyter-server extension integrating collaborative shared models.
|
|
5
5
|
Author-email: Jupyter Development Team <jupyter@googlegroups.com>
|
|
6
6
|
License: # Licensing terms
|
|
@@ -62,6 +62,7 @@ License: # Licensing terms
|
|
|
62
62
|
|
|
63
63
|
# Copyright (c) Jupyter Development Team.
|
|
64
64
|
# Distributed under the terms of the Modified BSD License.
|
|
65
|
+
License-File: LICENSE
|
|
65
66
|
Classifier: Framework :: Jupyter
|
|
66
67
|
Classifier: Intended Audience :: Developers
|
|
67
68
|
Classifier: Intended Audience :: Science/Research
|
|
@@ -75,9 +76,9 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
75
76
|
Classifier: Programming Language :: Python :: 3.12
|
|
76
77
|
Requires-Python: >=3.8
|
|
77
78
|
Requires-Dist: jsonschema>=4.18.0
|
|
78
|
-
Requires-Dist: jupyter-events>=0.
|
|
79
|
+
Requires-Dist: jupyter-events>=0.11.0
|
|
79
80
|
Requires-Dist: jupyter-server-fileid<1,>=0.7.0
|
|
80
|
-
Requires-Dist: jupyter-server<3.0.0,>=2.
|
|
81
|
+
Requires-Dist: jupyter-server<3.0.0,>=2.15.0
|
|
81
82
|
Requires-Dist: jupyter-ydoc!=3.0.0,!=3.0.1,<4.0.0,>=2.1.2
|
|
82
83
|
Requires-Dist: pycrdt
|
|
83
84
|
Requires-Dist: pycrdt-websocket<0.16.0,>=0.15.0
|
|
@@ -88,7 +89,7 @@ Requires-Dist: dirty-equals; extra == 'test'
|
|
|
88
89
|
Requires-Dist: httpx-ws>=0.5.2; extra == 'test'
|
|
89
90
|
Requires-Dist: importlib-metadata>=4.8.3; (python_version < '3.10') and extra == 'test'
|
|
90
91
|
Requires-Dist: jupyter-server-fileid[test]; extra == 'test'
|
|
91
|
-
Requires-Dist: jupyter-server[test]>=2.
|
|
92
|
+
Requires-Dist: jupyter-server[test]>=2.15.0; extra == 'test'
|
|
92
93
|
Requires-Dist: pytest-cov; extra == 'test'
|
|
93
94
|
Requires-Dist: pytest>=7.0; extra == 'test'
|
|
94
95
|
Description-Content-Type: text/markdown
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "2.0.0"
|
|
@@ -642,7 +642,12 @@ class DocForkHandler(APIHandler):
|
|
|
642
642
|
Optionally keeps the fork in sync with the root.
|
|
643
643
|
"""
|
|
644
644
|
fork_roomid = uuid4().hex
|
|
645
|
-
|
|
645
|
+
try:
|
|
646
|
+
root_room = await self._websocket_server.get_room(root_roomid)
|
|
647
|
+
except RoomNotFound:
|
|
648
|
+
self.set_status(404)
|
|
649
|
+
return self.finish({"code": 404, "error": "Root room not found"})
|
|
650
|
+
|
|
646
651
|
update = root_room.ydoc.get_update()
|
|
647
652
|
fork_ydoc = Doc()
|
|
648
653
|
fork_ydoc.apply_update(update)
|
|
@@ -676,7 +681,10 @@ class DocForkHandler(APIHandler):
|
|
|
676
681
|
"""
|
|
677
682
|
Deletes a forked document, and optionally merges it back in the root document.
|
|
678
683
|
"""
|
|
679
|
-
fork_info = FORK_ROOMS
|
|
684
|
+
fork_info = FORK_ROOMS.get(fork_roomid, None)
|
|
685
|
+
if fork_info is None:
|
|
686
|
+
self.set_status(404)
|
|
687
|
+
return self.finish({"code": 404, "error": "Fork room not found"})
|
|
680
688
|
root_roomid = fork_info["root_roomid"]
|
|
681
689
|
del FORK_ROOMS[fork_roomid]
|
|
682
690
|
if self.get_query_argument("merge") == "true":
|
|
@@ -153,6 +153,9 @@ class FileLoader:
|
|
|
153
153
|
path, format=model["format"], type=model["type"], content=False
|
|
154
154
|
)
|
|
155
155
|
)
|
|
156
|
+
# Skip saving if file is not writable
|
|
157
|
+
if not m["writable"]:
|
|
158
|
+
return None
|
|
156
159
|
|
|
157
160
|
if self.last_modified == m["last_modified"]:
|
|
158
161
|
self._log.info("Saving file: %s", path)
|
{jupyter_server_ydoc-1.1.0rc0 → jupyter_server_ydoc-2.0.0}/jupyter_server_ydoc/pytest_plugin.py
RENAMED
|
@@ -271,13 +271,16 @@ def rtc_create_mock_document_room():
|
|
|
271
271
|
last_modified: datetime | None = None,
|
|
272
272
|
save_delay: float | None = None,
|
|
273
273
|
store: SQLiteYStore | None = None,
|
|
274
|
+
writable: bool = False,
|
|
274
275
|
) -> tuple[FakeContentsManager, FileLoader, DocumentRoom]:
|
|
275
276
|
paths = {id: path}
|
|
276
277
|
|
|
277
278
|
if last_modified is None:
|
|
278
|
-
cm = FakeContentsManager({"content": content})
|
|
279
|
+
cm = FakeContentsManager({"content": content, "writable": writable})
|
|
279
280
|
else:
|
|
280
|
-
cm = FakeContentsManager(
|
|
281
|
+
cm = FakeContentsManager(
|
|
282
|
+
{"last_modified": datetime.now(), "content": content, "writable": writable}
|
|
283
|
+
)
|
|
281
284
|
|
|
282
285
|
loader = FileLoader(
|
|
283
286
|
id,
|
|
@@ -28,11 +28,11 @@ authors = [
|
|
|
28
28
|
{ name = "Jupyter Development Team", email = "jupyter@googlegroups.com" },
|
|
29
29
|
]
|
|
30
30
|
dependencies = [
|
|
31
|
-
"jupyter_server>=2.
|
|
31
|
+
"jupyter_server>=2.15.0,<3.0.0",
|
|
32
32
|
"jupyter_ydoc>=2.1.2,<4.0.0,!=3.0.0,!=3.0.1",
|
|
33
33
|
"pycrdt",
|
|
34
34
|
"pycrdt-websocket>=0.15.0,<0.16.0",
|
|
35
|
-
"jupyter_events>=0.
|
|
35
|
+
"jupyter_events>=0.11.0",
|
|
36
36
|
"jupyter_server_fileid>=0.7.0,<1",
|
|
37
37
|
"jsonschema>=4.18.0"
|
|
38
38
|
]
|
|
@@ -42,7 +42,7 @@ dynamic = ["version"]
|
|
|
42
42
|
test = [
|
|
43
43
|
"coverage",
|
|
44
44
|
"dirty-equals",
|
|
45
|
-
"jupyter_server[test]>=2.
|
|
45
|
+
"jupyter_server[test]>=2.15.0",
|
|
46
46
|
"jupyter_server_fileid[test]",
|
|
47
47
|
"pytest>=7.0",
|
|
48
48
|
"pytest-cov",
|
|
@@ -51,7 +51,9 @@ async def test_defined_save_delay_should_save_content_after_document_change(
|
|
|
51
51
|
rtc_create_mock_document_room,
|
|
52
52
|
):
|
|
53
53
|
content = "test"
|
|
54
|
-
cm, _, room = rtc_create_mock_document_room(
|
|
54
|
+
cm, _, room = rtc_create_mock_document_room(
|
|
55
|
+
"test-id", "test.txt", content, save_delay=0.01, writable=True
|
|
56
|
+
)
|
|
55
57
|
|
|
56
58
|
await room.initialize()
|
|
57
59
|
room._document.source = "Test 2"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "1.1.0rc0"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{jupyter_server_ydoc-1.1.0rc0 → jupyter_server_ydoc-2.0.0}/jupyter-config/jupyter_server_ydoc.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{jupyter_server_ydoc-1.1.0rc0 → jupyter_server_ydoc-2.0.0}/jupyter_server_ydoc/test_utils.py
RENAMED
|
File without changes
|
|
File without changes
|
{jupyter_server_ydoc-1.1.0rc0 → jupyter_server_ydoc-2.0.0}/jupyter_server_ydoc/websocketserver.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|