From 9afe97db387101ea93b9c0dd97de439b663a0f5e Mon Sep 17 00:00:00 2001 From: David Brochart Date: Tue, 26 Dec 2023 15:59:46 +0100 Subject: [PATCH] Update pycrdt v0.8 --- pyproject.toml | 2 +- tests/test_pycrdt_yjs.py | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 98fcefa..127451c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,7 +30,7 @@ classifiers = [ dependencies = [ "anyio >=3.6.2,<5", "aiosqlite >=0.18.0,<1", - "pycrdt >=0.7.0,<0.8.0", + "pycrdt >=0.8.1,<0.9.0", ] [project.optional-dependencies] diff --git a/tests/test_pycrdt_yjs.py b/tests/test_pycrdt_yjs.py index 19d5e2a..13924fd 100644 --- a/tests/test_pycrdt_yjs.py +++ b/tests/test_pycrdt_yjs.py @@ -1,5 +1,3 @@ -import json - import pytest from anyio import Event, create_task_group, move_on_after, sleep from pycrdt import Array, Doc, Map @@ -73,5 +71,5 @@ async def test_pycrdt_yjs_1(yws_server, yjs_client): await ytest.clock_run() ydoc["cells"] = ycells = Array() ydoc["state"] = ystate = Map() - assert json.loads(str(ycells)) == [{"metadata": {"foo": "bar"}, "source": "1 + 2"}] - assert dict(ystate) == {"state": {"dirty": False}} + assert ycells.to_py() == [{"metadata": {"foo": "bar"}, "source": "1 + 2"}] + assert ystate.to_py() == {"state": {"dirty": False}}