jupyter-server-ydoc 1.0.0b1__tar.gz → 1.0.0b3__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.0.0b1 → jupyter_server_ydoc-1.0.0b3}/PKG-INFO +3 -3
- jupyter_server_ydoc-1.0.0b3/jupyter_server_ydoc/_version.py +1 -0
- {jupyter_server_ydoc-1.0.0b1 → jupyter_server_ydoc-1.0.0b3}/jupyter_server_ydoc/loaders.py +17 -3
- {jupyter_server_ydoc-1.0.0b1 → jupyter_server_ydoc-1.0.0b3}/jupyter_server_ydoc/rooms.py +3 -1
- {jupyter_server_ydoc-1.0.0b1 → jupyter_server_ydoc-1.0.0b3}/pyproject.toml +2 -2
- jupyter_server_ydoc-1.0.0b1/jupyter_server_ydoc/_version.py +0 -1
- {jupyter_server_ydoc-1.0.0b1 → jupyter_server_ydoc-1.0.0b3}/.gitignore +0 -0
- {jupyter_server_ydoc-1.0.0b1 → jupyter_server_ydoc-1.0.0b3}/LICENSE +0 -0
- {jupyter_server_ydoc-1.0.0b1 → jupyter_server_ydoc-1.0.0b3}/README.md +0 -0
- {jupyter_server_ydoc-1.0.0b1 → jupyter_server_ydoc-1.0.0b3}/jupyter-config/jupyter_server_ydoc.json +0 -0
- {jupyter_server_ydoc-1.0.0b1 → jupyter_server_ydoc-1.0.0b3}/jupyter_server_ydoc/__init__.py +0 -0
- {jupyter_server_ydoc-1.0.0b1 → jupyter_server_ydoc-1.0.0b3}/jupyter_server_ydoc/app.py +0 -0
- {jupyter_server_ydoc-1.0.0b1 → jupyter_server_ydoc-1.0.0b3}/jupyter_server_ydoc/events/awareness.yaml +0 -0
- {jupyter_server_ydoc-1.0.0b1 → jupyter_server_ydoc-1.0.0b3}/jupyter_server_ydoc/events/session.yaml +0 -0
- {jupyter_server_ydoc-1.0.0b1 → jupyter_server_ydoc-1.0.0b3}/jupyter_server_ydoc/handlers.py +0 -0
- {jupyter_server_ydoc-1.0.0b1 → jupyter_server_ydoc-1.0.0b3}/jupyter_server_ydoc/pytest_plugin.py +0 -0
- {jupyter_server_ydoc-1.0.0b1 → jupyter_server_ydoc-1.0.0b3}/jupyter_server_ydoc/stores.py +0 -0
- {jupyter_server_ydoc-1.0.0b1 → jupyter_server_ydoc-1.0.0b3}/jupyter_server_ydoc/test_utils.py +0 -0
- {jupyter_server_ydoc-1.0.0b1 → jupyter_server_ydoc-1.0.0b3}/jupyter_server_ydoc/utils.py +0 -0
- {jupyter_server_ydoc-1.0.0b1 → jupyter_server_ydoc-1.0.0b3}/jupyter_server_ydoc/websocketserver.py +0 -0
- {jupyter_server_ydoc-1.0.0b1 → jupyter_server_ydoc-1.0.0b3}/setup.py +0 -0
- {jupyter_server_ydoc-1.0.0b1 → jupyter_server_ydoc-1.0.0b3}/tests/__init__.py +0 -0
- {jupyter_server_ydoc-1.0.0b1 → jupyter_server_ydoc-1.0.0b3}/tests/conftest.py +0 -0
- {jupyter_server_ydoc-1.0.0b1 → jupyter_server_ydoc-1.0.0b3}/tests/test_app.py +0 -0
- {jupyter_server_ydoc-1.0.0b1 → jupyter_server_ydoc-1.0.0b3}/tests/test_documents.py +0 -0
- {jupyter_server_ydoc-1.0.0b1 → jupyter_server_ydoc-1.0.0b3}/tests/test_handlers.py +0 -0
- {jupyter_server_ydoc-1.0.0b1 → jupyter_server_ydoc-1.0.0b3}/tests/test_loaders.py +0 -0
- {jupyter_server_ydoc-1.0.0b1 → jupyter_server_ydoc-1.0.0b3}/tests/test_rooms.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: jupyter-server-ydoc
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.0b3
|
|
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
|
|
@@ -78,8 +78,8 @@ Requires-Python: >=3.8
|
|
|
78
78
|
Requires-Dist: jsonschema>=4.18.0
|
|
79
79
|
Requires-Dist: jupyter-events>=0.10.0
|
|
80
80
|
Requires-Dist: jupyter-server-fileid<1,>=0.7.0
|
|
81
|
-
Requires-Dist: jupyter-server<3.0.0,>=2.
|
|
82
|
-
Requires-Dist: jupyter-ydoc<
|
|
81
|
+
Requires-Dist: jupyter-server<3.0.0,>=2.11.1
|
|
82
|
+
Requires-Dist: jupyter-ydoc<4.0.0,>=2.0.0
|
|
83
83
|
Requires-Dist: pycrdt
|
|
84
84
|
Requires-Dist: pycrdt-websocket<0.15.0,>=0.14.0
|
|
85
85
|
Provides-Extra: test
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "1.0.0b3"
|
|
@@ -117,7 +117,7 @@ class FileLoader:
|
|
|
117
117
|
self.last_modified = model["last_modified"]
|
|
118
118
|
return model
|
|
119
119
|
|
|
120
|
-
async def maybe_save_content(self, model: dict[str, Any]) -> None:
|
|
120
|
+
async def maybe_save_content(self, model: dict[str, Any]) -> dict[str, Any] | None:
|
|
121
121
|
"""
|
|
122
122
|
Save the content of the file.
|
|
123
123
|
|
|
@@ -149,20 +149,34 @@ class FileLoader:
|
|
|
149
149
|
# otherwise it could corrupt the file
|
|
150
150
|
done_saving = asyncio.Event()
|
|
151
151
|
task = asyncio.create_task(self._save_content(model, done_saving))
|
|
152
|
+
saved_model = None
|
|
152
153
|
try:
|
|
153
|
-
await asyncio.shield(task)
|
|
154
|
+
saved_model = await asyncio.shield(task)
|
|
154
155
|
except asyncio.CancelledError:
|
|
155
156
|
pass
|
|
156
157
|
await done_saving.wait()
|
|
158
|
+
return saved_model
|
|
157
159
|
else:
|
|
158
160
|
# file changed on disk, raise an error
|
|
159
161
|
self.last_modified = m["last_modified"]
|
|
160
162
|
raise OutOfBandChanges
|
|
161
163
|
|
|
162
|
-
async def _save_content(
|
|
164
|
+
async def _save_content(
|
|
165
|
+
self, model: dict[str, Any], done_saving: asyncio.Event
|
|
166
|
+
) -> dict[str, Any]:
|
|
163
167
|
try:
|
|
164
168
|
m = await ensure_async(self._contents_manager.save(model, self.path))
|
|
165
169
|
self.last_modified = m["last_modified"]
|
|
170
|
+
# TODO, get rid of the extra `get` here once upstream issue:
|
|
171
|
+
# https://github.com/jupyter-server/jupyter_server/issues/1453 is resolved
|
|
172
|
+
model_with_hash = await ensure_async(
|
|
173
|
+
self._contents_manager.get(
|
|
174
|
+
self.path,
|
|
175
|
+
content=False,
|
|
176
|
+
require_hash=True,
|
|
177
|
+
)
|
|
178
|
+
)
|
|
179
|
+
return {**m, "hash": model_with_hash["hash"]}
|
|
166
180
|
finally:
|
|
167
181
|
done_saving.set()
|
|
168
182
|
|
|
@@ -271,7 +271,7 @@ class DocumentRoom(YRoom):
|
|
|
271
271
|
await asyncio.sleep(self._save_delay)
|
|
272
272
|
|
|
273
273
|
self.log.info("Saving the content from room %s", self._room_id)
|
|
274
|
-
await self._file.maybe_save_content(
|
|
274
|
+
saved_model = await self._file.maybe_save_content(
|
|
275
275
|
{
|
|
276
276
|
"format": self._file_format,
|
|
277
277
|
"type": self._file_type,
|
|
@@ -280,6 +280,8 @@ class DocumentRoom(YRoom):
|
|
|
280
280
|
)
|
|
281
281
|
async with self._update_lock:
|
|
282
282
|
self._document.dirty = False
|
|
283
|
+
if saved_model:
|
|
284
|
+
self._document.hash = saved_model["hash"]
|
|
283
285
|
|
|
284
286
|
self._emit(LogLevel.INFO, "save", "Content saved.")
|
|
285
287
|
|
|
@@ -28,8 +28,8 @@ authors = [
|
|
|
28
28
|
{ name = "Jupyter Development Team", email = "jupyter@googlegroups.com" },
|
|
29
29
|
]
|
|
30
30
|
dependencies = [
|
|
31
|
-
"jupyter_server>=2.
|
|
32
|
-
"jupyter_ydoc>=2.0.0,<
|
|
31
|
+
"jupyter_server>=2.11.1,<3.0.0",
|
|
32
|
+
"jupyter_ydoc>=2.0.0,<4.0.0",
|
|
33
33
|
"pycrdt",
|
|
34
34
|
"pycrdt-websocket>=0.14.0,<0.15.0",
|
|
35
35
|
"jupyter_events>=0.10.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "1.0.0b1"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{jupyter_server_ydoc-1.0.0b1 → jupyter_server_ydoc-1.0.0b3}/jupyter-config/jupyter_server_ydoc.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{jupyter_server_ydoc-1.0.0b1 → jupyter_server_ydoc-1.0.0b3}/jupyter_server_ydoc/events/session.yaml
RENAMED
|
File without changes
|
|
File without changes
|
{jupyter_server_ydoc-1.0.0b1 → jupyter_server_ydoc-1.0.0b3}/jupyter_server_ydoc/pytest_plugin.py
RENAMED
|
File without changes
|
|
File without changes
|
{jupyter_server_ydoc-1.0.0b1 → jupyter_server_ydoc-1.0.0b3}/jupyter_server_ydoc/test_utils.py
RENAMED
|
File without changes
|
|
File without changes
|
{jupyter_server_ydoc-1.0.0b1 → jupyter_server_ydoc-1.0.0b3}/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
|
|
File without changes
|