pycrdt 0.12.41__cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl → 0.12.43__cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
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.
Potentially problematic release.
This version of pycrdt might be problematic. Click here for more details.
- pycrdt/__init__.py +4 -0
- pycrdt/_doc.py +26 -5
- pycrdt/_pycrdt.cpython-313-aarch64-linux-gnu.so +0 -0
- pycrdt/_xml.py +1 -3
- {pycrdt-0.12.41.dist-info → pycrdt-0.12.43.dist-info}/METADATA +1 -1
- {pycrdt-0.12.41.dist-info → pycrdt-0.12.43.dist-info}/RECORD +8 -8
- {pycrdt-0.12.41.dist-info → pycrdt-0.12.43.dist-info}/WHEEL +0 -0
- {pycrdt-0.12.41.dist-info → pycrdt-0.12.43.dist-info}/licenses/LICENSE +0 -0
pycrdt/__init__.py
CHANGED
pycrdt/_doc.py
CHANGED
|
@@ -2,7 +2,19 @@ from __future__ import annotations
|
|
|
2
2
|
|
|
3
3
|
from functools import partial
|
|
4
4
|
from inspect import iscoroutinefunction
|
|
5
|
-
from typing import
|
|
5
|
+
from typing import (
|
|
6
|
+
Any,
|
|
7
|
+
Awaitable,
|
|
8
|
+
Callable,
|
|
9
|
+
Generic,
|
|
10
|
+
Iterable,
|
|
11
|
+
Literal,
|
|
12
|
+
Type,
|
|
13
|
+
TypeVar,
|
|
14
|
+
Union,
|
|
15
|
+
cast,
|
|
16
|
+
overload,
|
|
17
|
+
)
|
|
6
18
|
|
|
7
19
|
from anyio import BrokenResourceError, create_memory_object_stream
|
|
8
20
|
from anyio.streams.memory import MemoryObjectReceiveStream, MemoryObjectSendStream
|
|
@@ -15,7 +27,9 @@ from ._snapshot import Snapshot
|
|
|
15
27
|
from ._transaction import NewTransaction, ReadTransaction, Transaction
|
|
16
28
|
|
|
17
29
|
T = TypeVar("T", bound=BaseType)
|
|
18
|
-
TransactionOrSubdocsEvent = TypeVar(
|
|
30
|
+
TransactionOrSubdocsEvent = TypeVar(
|
|
31
|
+
"TransactionOrSubdocsEvent", bound=TransactionEvent | SubdocsEvent
|
|
32
|
+
)
|
|
19
33
|
|
|
20
34
|
|
|
21
35
|
class Doc(BaseDoc, Generic[T]):
|
|
@@ -47,7 +61,11 @@ class Doc(BaseDoc, Generic[T]):
|
|
|
47
61
|
allow_multithreading: Whether to allow the document to be used in different threads.
|
|
48
62
|
"""
|
|
49
63
|
super().__init__(
|
|
50
|
-
client_id=client_id,
|
|
64
|
+
client_id=client_id,
|
|
65
|
+
skip_gc=skip_gc,
|
|
66
|
+
doc=doc,
|
|
67
|
+
Model=Model,
|
|
68
|
+
allow_multithreading=allow_multithreading,
|
|
51
69
|
)
|
|
52
70
|
for k, v in init.items():
|
|
53
71
|
self[k] = v
|
|
@@ -292,7 +310,8 @@ class Doc(BaseDoc, Generic[T]):
|
|
|
292
310
|
|
|
293
311
|
def observe(
|
|
294
312
|
self,
|
|
295
|
-
callback: Callable[[TransactionEvent], None]
|
|
313
|
+
callback: Callable[[TransactionEvent], None]
|
|
314
|
+
| Callable[[TransactionEvent], Awaitable[None]],
|
|
296
315
|
) -> Subscription:
|
|
297
316
|
"""
|
|
298
317
|
Subscribes a callback to be called with the document change event.
|
|
@@ -405,7 +424,9 @@ class Doc(BaseDoc, Generic[T]):
|
|
|
405
424
|
observe = self.observe_subdocs if subdocs else self.observe
|
|
406
425
|
if not self._send_streams[subdocs]:
|
|
407
426
|
if async_transactions:
|
|
408
|
-
self._event_subscription[subdocs] = observe(
|
|
427
|
+
self._event_subscription[subdocs] = observe(
|
|
428
|
+
partial(self._async_send_event, subdocs)
|
|
429
|
+
)
|
|
409
430
|
else:
|
|
410
431
|
self._event_subscription[subdocs] = observe(partial(self._send_event, subdocs))
|
|
411
432
|
send_stream, receive_stream = create_memory_object_stream[
|
|
Binary file
|
pycrdt/_xml.py
CHANGED
|
@@ -269,9 +269,7 @@ class XmlText(_XmlTraitMixin):
|
|
|
269
269
|
self._do_and_integrate("insert", value, txn._txn, index, _attrs)
|
|
270
270
|
else:
|
|
271
271
|
# primitive type
|
|
272
|
-
self.integrated.insert_embed(
|
|
273
|
-
txn._txn, index, value, _attrs
|
|
274
|
-
)
|
|
272
|
+
self.integrated.insert_embed(txn._txn, index, value, _attrs)
|
|
275
273
|
|
|
276
274
|
def format(self, start: int, stop: int, attrs: dict[str, Any]) -> None:
|
|
277
275
|
"""
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
pycrdt-0.12.
|
|
2
|
-
pycrdt-0.12.
|
|
3
|
-
pycrdt-0.12.
|
|
4
|
-
pycrdt/__init__.py,sha256=
|
|
1
|
+
pycrdt-0.12.43.dist-info/METADATA,sha256=WjsPXYmdmXwkx11AXEfOfxugK-CamsyPc_kFk6SrGzY,1530
|
|
2
|
+
pycrdt-0.12.43.dist-info/WHEEL,sha256=k7Uy46Wme2d4Iy5o6NUPtkUZyYc3Sjkz-EhspAso-NE,131
|
|
3
|
+
pycrdt-0.12.43.dist-info/licenses/LICENSE,sha256=Sesm0tdTWXYb_Om3U3LUusWWhxEyBNO19HXj8nLklfc,1081
|
|
4
|
+
pycrdt/__init__.py,sha256=iCcAXkPsXiSkeEuV_DuPVI5hJIy1IsxXIo9iTTQBs4w,2183
|
|
5
5
|
pycrdt/_array.py,sha256=sWGBro3o279Cw1_EOTlEWFe51Ymo66Nt-gLPV2cY0p0,14614
|
|
6
6
|
pycrdt/_awareness.py,sha256=1F8olK8EgF6ea2VzeDwHjnoy090cAYOjakwA4yLxWH0,10904
|
|
7
7
|
pycrdt/_base.py,sha256=5BN2wVlyBWqq5j1CF0WEt3eakjirRziJ5SvcNAwdSWs,13073
|
|
8
|
-
pycrdt/_doc.py,sha256=
|
|
8
|
+
pycrdt/_doc.py,sha256=ZP0ICNo1XhWTmGNXWSquM_j3LIklil4vDZc4jcoFrAM,16970
|
|
9
9
|
pycrdt/_map.py,sha256=N0rBhDfcMmzPfmzZyWP0lJdprGQhjg086-1OlApwEQw,10595
|
|
10
10
|
pycrdt/_provider.py,sha256=RigUnf6S6AWuxxZ7I-oDZYZbjnBZYTMD0It7ADBxsSI,5295
|
|
11
|
-
pycrdt/_pycrdt.cpython-313-aarch64-linux-gnu.so,sha256=
|
|
11
|
+
pycrdt/_pycrdt.cpython-313-aarch64-linux-gnu.so,sha256=P72AtHDIxQGZr62sA7HK0iZObZ8OR5iofrU9Yw65nTU,2586816
|
|
12
12
|
pycrdt/_pycrdt.pyi,sha256=hSpWHqxWPRqn0OsMSaWO9v_4yUC48VZfn1V552u5E9A,16200
|
|
13
13
|
pycrdt/_snapshot.py,sha256=3Yof2MsnKs4T3OlCnBJlxjuvduRViHbtLfN_m65FXqk,1366
|
|
14
14
|
pycrdt/_sticky_index.py,sha256=3-KoFY3fCHTrQrHHtPJkDjTOCX3AGK9fnZNnOg0qqvE,4467
|
|
@@ -18,6 +18,6 @@ pycrdt/_transaction.py,sha256=Nemid8cwfSZqOSiYeCNSWL9Jfg_LgzE5vushb7JqftQ,5442
|
|
|
18
18
|
pycrdt/_undo.py,sha256=NYvyngRDFtOnWpCS4M5AGwKNYXjgJQMl2fDsG8iZ6oU,4075
|
|
19
19
|
pycrdt/_update.py,sha256=VLqfKIab0qlRrHTgWNWjGiULzEC4Zjt-EtN1oltaoJk,1158
|
|
20
20
|
pycrdt/_version.py,sha256=-6olC6rrn13JKphGwX4vnzXh3q4oCrxxJR8STERSBIw,184
|
|
21
|
-
pycrdt/_xml.py,sha256=
|
|
21
|
+
pycrdt/_xml.py,sha256=D7tewpsOD4UYT6yj2J-QRfJY2o_KjIWLXIWQh1WGZkI,18830
|
|
22
22
|
pycrdt/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
23
|
-
pycrdt-0.12.
|
|
23
|
+
pycrdt-0.12.43.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|