Skip to content

Commit 807dc51

Browse files
authored
Update API (#32)
* Update API (see y-crdt/ypy#54) * y-py>=0.5.2
1 parent e85802f commit 807dc51

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

jupyter_ydoc/ydoc.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,10 @@ def source(self, value):
6262
# clear document
6363
source_len = len(self._ysource)
6464
if source_len:
65-
self._ysource.delete(t, 0, source_len)
65+
self._ysource.delete_range(t, 0, source_len)
6666
# initialize document
6767
if value:
68-
self._ysource.push(t, value)
68+
self._ysource.extend(t, value)
6969

7070
def observe(self, callback):
7171
self.unobserve()

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ python_requires = >=3.7
2222

2323
install_requires =
2424
setuptools
25-
y-py >=0.5.0,<0.6.0
25+
y-py >=0.5.2,<0.6.0
2626
ypy-websocket >=0.1.8
2727

2828
[options.extras_require]

0 commit comments

Comments
 (0)