Date: Thu, 11 Jul 2024 11:45:29 GMT From: Po-Chuan Hsieh <sunpoet@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: e33ada59d9e0 - main - devel/py-jupyter-ydoc: Update to 2.1.0 Message-ID: <202407111145.46BBjTuj074444@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=e33ada59d9e00948ec43a75c66394240a85dabe3 commit e33ada59d9e00948ec43a75c66394240a85dabe3 Author: Po-Chuan Hsieh <sunpoet@FreeBSD.org> AuthorDate: 2024-07-11 11:40:57 +0000 Commit: Po-Chuan Hsieh <sunpoet@FreeBSD.org> CommitDate: 2024-07-11 11:40:57 +0000 devel/py-jupyter-ydoc: Update to 2.1.0 Changes: https://github.com/jupyter-server/jupyter_ydoc/releases https://jupyter-ydoc.readthedocs.io/en/latest/changelog.html --- devel/py-jupyter-ydoc/Makefile | 3 +- devel/py-jupyter-ydoc/distinfo | 6 +- devel/py-jupyter-ydoc/files/patch-pycrdt | 122 ------------------------------- 3 files changed, 4 insertions(+), 127 deletions(-) diff --git a/devel/py-jupyter-ydoc/Makefile b/devel/py-jupyter-ydoc/Makefile index 7fad394ef639..c361d7eddc8b 100644 --- a/devel/py-jupyter-ydoc/Makefile +++ b/devel/py-jupyter-ydoc/Makefile @@ -1,6 +1,5 @@ PORTNAME= jupyter-ydoc -PORTVERSION= 2.0.1 -PORTREVISION= 1 +PORTVERSION= 2.1.0 CATEGORIES= devel python MASTER_SITES= PYPI \ https://github.com/jupyter-server/jupyter_ydoc/releases/download/v${PORTVERSION}/ diff --git a/devel/py-jupyter-ydoc/distinfo b/devel/py-jupyter-ydoc/distinfo index a9f52ae9e208..6420e17ef757 100644 --- a/devel/py-jupyter-ydoc/distinfo +++ b/devel/py-jupyter-ydoc/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1708449198 -SHA256 (jupyter_ydoc-2.0.1.tar.gz) = 716dda8cb8af881fec2fbc88aea3fb0d3bb24bbeb80a99a8aff2e01d089d5b0d -SIZE (jupyter_ydoc-2.0.1.tar.gz) = 954635 +TIMESTAMP = 1720689618 +SHA256 (jupyter_ydoc-2.1.0.tar.gz) = 27eac4eb4f644072f45e50016f032f1ef4e2eacd5be5934af65c17b895c511d9 +SIZE (jupyter_ydoc-2.1.0.tar.gz) = 954926 diff --git a/devel/py-jupyter-ydoc/files/patch-pycrdt b/devel/py-jupyter-ydoc/files/patch-pycrdt deleted file mode 100644 index 4ddf4e3a153b..000000000000 --- a/devel/py-jupyter-ydoc/files/patch-pycrdt +++ /dev/null @@ -1,122 +0,0 @@ ---- jupyter_ydoc/__init__.py.orig 2020-02-02 00:00:00 UTC -+++ jupyter_ydoc/__init__.py -@@ -3,11 +3,11 @@ import sys - - import sys - --from ._version import __version__ # noqa --from .yblob import YBlob # noqa --from .yfile import YFile # noqa --from .ynotebook import YNotebook # noqa --from .yunicode import YUnicode # noqa -+from ._version import __version__ as __version__ -+from .yblob import YBlob as YBlob -+from .yfile import YFile as YFile -+from .ynotebook import YNotebook as YNotebook -+from .yunicode import YUnicode as YUnicode - - # See compatibility note on `group` keyword in - # https://docs.python.org/3/library/importlib.metadata.html#entry-points ---- jupyter_ydoc/ybasedoc.py.orig 2020-02-02 00:00:00 UTC -+++ jupyter_ydoc/ybasedoc.py -@@ -2,9 +2,9 @@ from abc import ABC, abstractmethod - # Distributed under the terms of the Modified BSD License. - - from abc import ABC, abstractmethod --from typing import Any, Callable, Dict, Optional -+from typing import Any, Callable, Optional - --from pycrdt import Doc, Map -+from pycrdt import Doc, Map, Subscription, UndoManager - - - class YBaseDoc(ABC): -@@ -15,6 +15,11 @@ class YBaseDoc(ABC): - subscribe to changes in the document. - """ - -+ _ydoc: Doc -+ _ystate: Map -+ _subscriptions: dict[Any, Subscription] -+ _undo_manager: UndoManager -+ - def __init__(self, ydoc: Optional[Doc] = None): - """ - Constructs a YBaseDoc. -@@ -26,8 +31,9 @@ class YBaseDoc(ABC): - self._ydoc = Doc() - else: - self._ydoc = ydoc -- self._ydoc["state"] = self._ystate = Map() -- self._subscriptions: Dict[Any, str] = {} -+ self._ystate = self._ydoc.get("state", type=Map) -+ self._subscriptions = {} -+ self._undo_manager = UndoManager(doc=self._ydoc, capture_timeout_millis=0) - - @property - @abstractmethod -@@ -40,6 +46,15 @@ class YBaseDoc(ABC): - """ - - @property -+ def undo_manager(self) -> UndoManager: -+ """ -+ A :class:`pycrdt.UndoManager` for the document. -+ -+ :return: The document's undo manager. -+ :rtype: :class:`pycrdt.UndoManager` -+ """ -+ return self._undo_manager -+ - def ystate(self) -> Map: - """ - A :class:`pycrdt.Map` containing the state of the document. ---- jupyter_ydoc/yblob.py.orig 2020-02-02 00:00:00 UTC -+++ jupyter_ydoc/yblob.py -@@ -36,7 +36,8 @@ class YBlob(YBaseDoc): - :type ydoc: :class:`pycrdt.Doc`, optional. - """ - super().__init__(ydoc) -- self._ydoc["source"] = self._ysource = Map() -+ self._ysource = self._ydoc.get("source", type=Map) -+ self.undo_manager.expand_scope(self._ysource) - - @property - def version(self) -> str: ---- jupyter_ydoc/ynotebook.py.orig 2020-02-02 00:00:00 UTC -+++ jupyter_ydoc/ynotebook.py -@@ -54,8 +54,9 @@ class YNotebook(YBaseDoc): - :type ydoc: :class:`pycrdt.Doc`, optional. - """ - super().__init__(ydoc) -- self._ydoc["meta"] = self._ymeta = Map() -- self._ydoc["cells"] = self._ycells = Array() -+ self._ymeta = self._ydoc.get("meta", type=Map) -+ self._ycells = self._ydoc.get("cells", type=Array) -+ self.undo_manager.expand_scope(self._ycells) - - @property - def version(self) -> str: ---- jupyter_ydoc/yunicode.py.orig 2020-02-02 00:00:00 UTC -+++ jupyter_ydoc/yunicode.py -@@ -31,7 +31,8 @@ class YUnicode(YBaseDoc): - :type ydoc: :class:`pycrdt.Doc`, optional. - """ - super().__init__(ydoc) -- self._ydoc["source"] = self._ysource = Text() -+ self._ysource = self._ydoc.get("source", type=Text) -+ self.undo_manager.expand_scope(self._ysource) - - @property - def version(self) -> str: ---- pyproject.toml.orig 2020-02-02 00:00:00 UTC -+++ pyproject.toml -@@ -13,7 +13,7 @@ dependencies = [ - keywords = ["jupyter", "ypy"] - dependencies = [ - "importlib_metadata >=3.6; python_version<'3.10'", -- "pycrdt >=0.8.1,<0.9.0", -+ "pycrdt >=0.9.0,<0.10.0", - ] - - [[project.authors]]
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202407111145.46BBjTuj074444>