asyncactor 0.28.1__tar.gz → 0.28.2__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.
- {asyncactor-0.28.1 → asyncactor-0.28.2}/PKG-INFO +1 -1
- {asyncactor-0.28.1 → asyncactor-0.28.2}/asyncactor/abc.py +1 -2
- {asyncactor-0.28.1 → asyncactor-0.28.2}/asyncactor/actor.py +3 -5
- {asyncactor-0.28.1 → asyncactor-0.28.2}/asyncactor/backend/__init__.py +1 -1
- {asyncactor-0.28.1 → asyncactor-0.28.2}/asyncactor/backend/moat_kv.py +1 -3
- {asyncactor-0.28.1 → asyncactor-0.28.2}/asyncactor/backend/moat_link.py +5 -3
- {asyncactor-0.28.1 → asyncactor-0.28.2}/asyncactor/backend/mqtt.py +3 -4
- {asyncactor-0.28.1 → asyncactor-0.28.2}/asyncactor/backend/mqttproto.py +2 -1
- {asyncactor-0.28.1 → asyncactor-0.28.2}/asyncactor/events.py +10 -8
- {asyncactor-0.28.1 → asyncactor-0.28.2}/asyncactor/messages.py +8 -6
- {asyncactor-0.28.1 → asyncactor-0.28.2}/asyncactor/nodelist.py +4 -0
- {asyncactor-0.28.1 → asyncactor-0.28.2}/asyncactor.egg-info/PKG-INFO +1 -1
- {asyncactor-0.28.1 → asyncactor-0.28.2}/pyproject.toml +13 -4
- {asyncactor-0.28.1 → asyncactor-0.28.2}/tests/test_actor.py +4 -4
- {asyncactor-0.28.1 → asyncactor-0.28.2}/tests/test_mosquitto.py +25 -12
- {asyncactor-0.28.1 → asyncactor-0.28.2}/tests/test_mqttproto.py +3 -2
- {asyncactor-0.28.1 → asyncactor-0.28.2}/.coveragerc +0 -0
- {asyncactor-0.28.1 → asyncactor-0.28.2}/.gitignore +0 -0
- {asyncactor-0.28.1 → asyncactor-0.28.2}/.pylintrc +0 -0
- {asyncactor-0.28.1 → asyncactor-0.28.2}/.readthedocs.yml +0 -0
- {asyncactor-0.28.1 → asyncactor-0.28.2}/.style.yapf +0 -0
- {asyncactor-0.28.1 → asyncactor-0.28.2}/CHANGELOG.rst +0 -0
- {asyncactor-0.28.1 → asyncactor-0.28.2}/LICENSE +0 -0
- {asyncactor-0.28.1 → asyncactor-0.28.2}/Makefile +0 -0
- {asyncactor-0.28.1 → asyncactor-0.28.2}/README.rst +0 -0
- {asyncactor-0.28.1 → asyncactor-0.28.2}/asyncactor/__init__.py +0 -0
- {asyncactor-0.28.1 → asyncactor-0.28.2}/asyncactor/backend/serf.py +2 -2
- {asyncactor-0.28.1 → asyncactor-0.28.2}/asyncactor/exceptions.py +0 -0
- {asyncactor-0.28.1 → asyncactor-0.28.2}/asyncactor.egg-info/SOURCES.txt +0 -0
- {asyncactor-0.28.1 → asyncactor-0.28.2}/asyncactor.egg-info/dependency_links.txt +0 -0
- {asyncactor-0.28.1 → asyncactor-0.28.2}/asyncactor.egg-info/requires.txt +0 -0
- {asyncactor-0.28.1 → asyncactor-0.28.2}/asyncactor.egg-info/top_level.txt +0 -0
- {asyncactor-0.28.1 → asyncactor-0.28.2}/ci/rtd-requirements.txt +0 -0
- {asyncactor-0.28.1 → asyncactor-0.28.2}/ci/test-requirements.txt +0 -0
- {asyncactor-0.28.1 → asyncactor-0.28.2}/docs/Makefile +0 -0
- {asyncactor-0.28.1 → asyncactor-0.28.2}/docs/make.bat +0 -0
- {asyncactor-0.28.1 → asyncactor-0.28.2}/docs/source/_static/.git_empty +0 -0
- {asyncactor-0.28.1 → asyncactor-0.28.2}/docs/source/actor.rst +0 -0
- {asyncactor-0.28.1 → asyncactor-0.28.2}/docs/source/conf.py +0 -0
- {asyncactor-0.28.1 → asyncactor-0.28.2}/docs/source/history.rst +0 -0
- {asyncactor-0.28.1 → asyncactor-0.28.2}/docs/source/index.rst +0 -0
- {asyncactor-0.28.1 → asyncactor-0.28.2}/docs/source/rationale.rst +0 -0
- {asyncactor-0.28.1 → asyncactor-0.28.2}/mktag +0 -0
- {asyncactor-0.28.1 → asyncactor-0.28.2}/setup.cfg +0 -0
- {asyncactor-0.28.1 → asyncactor-0.28.2}/tests/__init__.py +0 -0
- {asyncactor-0.28.1 → asyncactor-0.28.2}/tests/mock_serf.py +4 -4
- {asyncactor-0.28.1 → asyncactor-0.28.2}/tests/test_serf.py +4 -4
- {asyncactor-0.28.1 → asyncactor-0.28.2}/tox.ini +0 -0
|
@@ -6,7 +6,6 @@ from __future__ import annotations
|
|
|
6
6
|
|
|
7
7
|
import anyio
|
|
8
8
|
import logging
|
|
9
|
-
import os
|
|
10
9
|
import time
|
|
11
10
|
from random import Random
|
|
12
11
|
|
|
@@ -22,7 +21,7 @@ from .events import (
|
|
|
22
21
|
TagEvent,
|
|
23
22
|
UntagEvent,
|
|
24
23
|
)
|
|
25
|
-
from .exceptions import ActorCollisionError
|
|
24
|
+
from .exceptions import ActorCollisionError
|
|
26
25
|
from .messages import HistoryMessage, InitMessage, Message, PingMessage, SetupMessage
|
|
27
26
|
from .nodelist import NodeList
|
|
28
27
|
|
|
@@ -676,9 +675,8 @@ class Actor(CtxObj):
|
|
|
676
675
|
"""
|
|
677
676
|
node = history[0]
|
|
678
677
|
ping = self._recover_pings.get(node, None)
|
|
679
|
-
if (
|
|
680
|
-
isinstance(ping,
|
|
681
|
-
or isinstance(ping, int)
|
|
678
|
+
if isinstance(ping, anyio.abc.Event) or (
|
|
679
|
+
isinstance(ping, int)
|
|
682
680
|
and self._nodes > 1
|
|
683
681
|
and ping < self._valid_pings - self._nodes / 2
|
|
684
682
|
):
|
|
@@ -4,15 +4,13 @@ Listener on top of a MoaT-KV transport
|
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
7
|
-
from asyncactor.abc import MonitorStream, Transport
|
|
8
|
-
|
|
9
7
|
from moat.util import CtxObj
|
|
8
|
+
from asyncactor.abc import MonitorStream, Transport
|
|
10
9
|
|
|
11
10
|
from typing import TYPE_CHECKING
|
|
12
11
|
|
|
13
12
|
if TYPE_CHECKING:
|
|
14
13
|
from collections.abc import AsyncIterator
|
|
15
|
-
|
|
16
14
|
from typing import Self
|
|
17
15
|
|
|
18
16
|
|
|
@@ -12,6 +12,7 @@ except ImportError:
|
|
|
12
12
|
from mqttproto import QoS
|
|
13
13
|
|
|
14
14
|
from moat.util import CtxObj, NotGiven
|
|
15
|
+
|
|
15
16
|
try:
|
|
16
17
|
from moat.lib.path import Path
|
|
17
18
|
except ImportError:
|
|
@@ -20,11 +21,10 @@ except ImportError:
|
|
|
20
21
|
from typing import TYPE_CHECKING
|
|
21
22
|
|
|
22
23
|
if TYPE_CHECKING:
|
|
23
|
-
from collections.abc import AsyncIterator, Awaitable
|
|
24
|
-
|
|
25
24
|
from moat.lib.codec import Codec
|
|
26
25
|
from moat.link.client import Link
|
|
27
26
|
|
|
27
|
+
from collections.abc import AsyncIterator, Awaitable
|
|
28
28
|
from typing import Self
|
|
29
29
|
|
|
30
30
|
|
|
@@ -52,7 +52,9 @@ class MQTTProtoTransport(Transport):
|
|
|
52
52
|
"""
|
|
53
53
|
Send a message.
|
|
54
54
|
"""
|
|
55
|
-
return self.conn.send(
|
|
55
|
+
return self.conn.send(
|
|
56
|
+
self.topic, payload, qos=QoS.AT_LEAST_ONCE, codec=self.codec, retain=False
|
|
57
|
+
)
|
|
56
58
|
|
|
57
59
|
def __repr__(self):
|
|
58
60
|
return f"<MQTT:{self.topic} @{self.conn!r}>"
|
|
@@ -6,13 +6,12 @@ DEPRECATED. Use "mqttproto" instead.
|
|
|
6
6
|
|
|
7
7
|
from __future__ import annotations
|
|
8
8
|
|
|
9
|
-
from asyncactor.abc import MonitorStream, Transport
|
|
10
|
-
|
|
11
9
|
import msgpack
|
|
12
|
-
|
|
13
|
-
from moat.util import CtxObj, create_queue
|
|
14
10
|
from moat.mqtt.client import MQTTClient
|
|
15
11
|
from moat.mqtt.mqtt.constants import QOS_0
|
|
12
|
+
from moat.util import CtxObj, create_queue
|
|
13
|
+
|
|
14
|
+
from asyncactor.abc import MonitorStream, Transport
|
|
16
15
|
|
|
17
16
|
|
|
18
17
|
class MQTTTransport(Transport):
|
|
@@ -8,11 +8,12 @@ from asyncactor.abc import MonitorStream, Transport
|
|
|
8
8
|
|
|
9
9
|
try:
|
|
10
10
|
from moat.lib.mqtt import QoS
|
|
11
|
-
except
|
|
11
|
+
except ImportError:
|
|
12
12
|
from mqttproto import QoS
|
|
13
13
|
|
|
14
14
|
from moat.util import CtxObj
|
|
15
15
|
from moat.lib.codec import get_codec
|
|
16
|
+
|
|
16
17
|
try:
|
|
17
18
|
from moat.lib.path import Path
|
|
18
19
|
except ImportError:
|
|
@@ -8,7 +8,7 @@ from contextlib import suppress
|
|
|
8
8
|
|
|
9
9
|
from attrs import define
|
|
10
10
|
|
|
11
|
-
from typing import TYPE_CHECKING
|
|
11
|
+
from typing import TYPE_CHECKING, TypeName
|
|
12
12
|
|
|
13
13
|
if TYPE_CHECKING:
|
|
14
14
|
from .messages import Message
|
|
@@ -17,18 +17,20 @@ if TYPE_CHECKING:
|
|
|
17
17
|
from typing import Any, ClassVar
|
|
18
18
|
|
|
19
19
|
__all__ = [
|
|
20
|
-
"NodeEvent",
|
|
21
20
|
"AuthPingEvent",
|
|
22
|
-
"TagEvent",
|
|
23
|
-
"UntagEvent",
|
|
24
21
|
"DetagEvent",
|
|
25
|
-
"RawMsgEvent",
|
|
26
|
-
"PingEvent",
|
|
27
22
|
"GoodNodeEvent",
|
|
23
|
+
"NodeEvent",
|
|
24
|
+
"PingEvent",
|
|
25
|
+
"RawMsgEvent",
|
|
28
26
|
"RecoverEvent",
|
|
29
27
|
"SetupEvent",
|
|
28
|
+
"TagEvent",
|
|
29
|
+
"UntagEvent",
|
|
30
30
|
]
|
|
31
31
|
|
|
32
|
+
TNode = TypeName("TNode")
|
|
33
|
+
|
|
32
34
|
|
|
33
35
|
class NodeEvent:
|
|
34
36
|
"Generic event"
|
|
@@ -187,6 +189,6 @@ class SetupEvent(NodeEvent):
|
|
|
187
189
|
|
|
188
190
|
def __init__(self, msg):
|
|
189
191
|
self.__attrs_init__()
|
|
190
|
-
for k in "version cycle gap nodes splits n_hosts"
|
|
192
|
+
for k in ["version", "cycle", "gap", "nodes", "splits", "n_hosts"]:
|
|
191
193
|
with suppress(AttributeError):
|
|
192
|
-
setattr(self, k, getattr(msg,k))
|
|
194
|
+
setattr(self, k, getattr(msg, k))
|
|
@@ -9,7 +9,7 @@ from contextlib import suppress
|
|
|
9
9
|
|
|
10
10
|
from attrs import asdict, define
|
|
11
11
|
|
|
12
|
-
from typing import TYPE_CHECKING
|
|
12
|
+
from typing import TYPE_CHECKING, TypeVar
|
|
13
13
|
|
|
14
14
|
if TYPE_CHECKING:
|
|
15
15
|
from .node import NodeList
|
|
@@ -17,11 +17,11 @@ if TYPE_CHECKING:
|
|
|
17
17
|
from typing import Any, ClassVar
|
|
18
18
|
|
|
19
19
|
__all__ = [
|
|
20
|
-
"
|
|
21
|
-
"SetupMessage",
|
|
20
|
+
"HistoryMessage",
|
|
22
21
|
"InitMessage",
|
|
22
|
+
"Message",
|
|
23
23
|
"PingMessage",
|
|
24
|
-
"
|
|
24
|
+
"SetupMessage",
|
|
25
25
|
]
|
|
26
26
|
|
|
27
27
|
|
|
@@ -34,6 +34,8 @@ class DataError(TypeError):
|
|
|
34
34
|
"""
|
|
35
35
|
|
|
36
36
|
|
|
37
|
+
TNode = TypeVar("TNode")
|
|
38
|
+
|
|
37
39
|
_types = {}
|
|
38
40
|
|
|
39
41
|
|
|
@@ -118,7 +120,7 @@ class SetupMessage(_NodeMessage):
|
|
|
118
120
|
raise ValueError("cycle must be >= 1")
|
|
119
121
|
if self.gap < (0.001 if self.override else 0.1):
|
|
120
122
|
raise ValueError("gap must be >= 0.1")
|
|
121
|
-
if self.cycle < self.gap * 3:
|
|
123
|
+
if not self.override and self.cycle < self.gap * 3:
|
|
122
124
|
raise ValueError("cycle must be >= 3*gap")
|
|
123
125
|
|
|
124
126
|
def __repr__(self):
|
|
@@ -161,7 +163,7 @@ class HistoryMessage(Message): # [TNode]
|
|
|
161
163
|
Your regular actor announcement.
|
|
162
164
|
"""
|
|
163
165
|
|
|
164
|
-
value:Any = None
|
|
166
|
+
value: Any = None
|
|
165
167
|
history: NodeList[TNode] = ()
|
|
166
168
|
|
|
167
169
|
_type: ClassVar[str] = "hist"
|
|
@@ -48,7 +48,7 @@ extend-exclude = ["tests", "docs", "asyncactor/backend/serf.py", "asyncactor/bac
|
|
|
48
48
|
|
|
49
49
|
[tool.ruff.lint]
|
|
50
50
|
select = ["ALL"]
|
|
51
|
-
ignore = ["ANN","PTH","PERF", "D105", "D107","A003","S101","RUF001","RUF002","PLW1514", "D2","D3","D4","T2","FBT","TRY003","EM10","PLR","C","RET50","TD","FIX","N","ERA","BLE001","COM812","ISC001"
|
|
51
|
+
ignore = ["ANN","PTH","PERF", "D105", "D107","A003","S101","RUF001","RUF002","PLW1514", "D2","D3","D4","T2","FBT","TRY003","EM10","PLR","C","RET50","TD","FIX","N","ERA","BLE001","COM812","ISC001"]
|
|
52
52
|
explicit-preview-rules = true
|
|
53
53
|
|
|
54
54
|
[tool.ruff.lint.flake8-comprehensions]
|
|
@@ -60,14 +60,23 @@ builtins-ignorelist = ["id","help"]
|
|
|
60
60
|
[tool.ruff.lint.isort]
|
|
61
61
|
no-lines-before = ["future"]
|
|
62
62
|
required-imports = ["from __future__ import annotations"]
|
|
63
|
-
section-order = [
|
|
63
|
+
section-order = [
|
|
64
|
+
"future",
|
|
65
|
+
"standard-library",
|
|
66
|
+
"first-party",
|
|
67
|
+
"third-party",
|
|
68
|
+
"upy",
|
|
69
|
+
"moat",
|
|
70
|
+
"local-folder",
|
|
71
|
+
"typing",
|
|
72
|
+
]
|
|
64
73
|
extra-standard-library = ["pytest", "anyio"]
|
|
65
74
|
force-to-top = ["moat.util"]
|
|
66
75
|
|
|
67
76
|
[tool.ruff.lint.isort.sections]
|
|
68
|
-
"moat" = ["moat"]
|
|
77
|
+
"moat" = ["moat","asyncactor"]
|
|
69
78
|
"upy" = ["micropython", "machine", "esp"]
|
|
70
|
-
"typing" = ["typing"]
|
|
79
|
+
"typing" = ["typing","collections"]
|
|
71
80
|
|
|
72
81
|
[tool.flake8]
|
|
73
82
|
max-line-length = 99
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
3
|
import logging
|
|
4
|
-
import pytest
|
|
5
4
|
import time
|
|
6
5
|
|
|
6
|
+
import pytest
|
|
7
|
+
import trio
|
|
8
|
+
|
|
7
9
|
from asyncactor.actor import (
|
|
8
10
|
Actor,
|
|
9
11
|
GoodNodeEvent,
|
|
@@ -14,8 +16,6 @@ from asyncactor.actor import (
|
|
|
14
16
|
UntagEvent,
|
|
15
17
|
)
|
|
16
18
|
|
|
17
|
-
import trio
|
|
18
|
-
|
|
19
19
|
from .mock_serf import stdtest
|
|
20
20
|
|
|
21
21
|
logging.basicConfig(level=logging.INFO)
|
|
@@ -63,7 +63,7 @@ async def test_10_all(autojump_clock): # pylint: disable=unused-argument
|
|
|
63
63
|
break
|
|
64
64
|
assert tagged <= 1
|
|
65
65
|
k.logger.debug("N2 %r", k._values)
|
|
66
|
-
# # This bit is broken for some reason
|
|
66
|
+
# # This bit is broken for some reason
|
|
67
67
|
if False:
|
|
68
68
|
for x in range(1, 6):
|
|
69
69
|
assert k._values["c_" + str(x)] == x * 31
|
|
@@ -2,9 +2,13 @@ from __future__ import annotations
|
|
|
2
2
|
|
|
3
3
|
import logging
|
|
4
4
|
import os
|
|
5
|
-
import pytest
|
|
6
5
|
import time
|
|
7
6
|
|
|
7
|
+
import pytest
|
|
8
|
+
import trio
|
|
9
|
+
from moat.mqtt.client import open_mqttclient
|
|
10
|
+
from moat.util import srepr
|
|
11
|
+
|
|
8
12
|
from asyncactor.actor import (
|
|
9
13
|
Actor,
|
|
10
14
|
GoodNodeEvent,
|
|
@@ -14,10 +18,6 @@ from asyncactor.actor import (
|
|
|
14
18
|
)
|
|
15
19
|
from asyncactor.backend import get_transport
|
|
16
20
|
|
|
17
|
-
import trio
|
|
18
|
-
|
|
19
|
-
from moat.mqtt.client import open_mqttclient
|
|
20
|
-
|
|
21
21
|
logging.basicConfig(level=logging.INFO)
|
|
22
22
|
|
|
23
23
|
N = 20
|
|
@@ -47,9 +47,9 @@ async def read_loop(client, transport):
|
|
|
47
47
|
async def test_20_all():
|
|
48
48
|
"""
|
|
49
49
|
This test starts multiple servers at the same time and checks that all
|
|
50
|
-
of them get their turn.
|
|
50
|
+
of them get their turn. Eventually.
|
|
51
51
|
"""
|
|
52
|
-
N =
|
|
52
|
+
N = 6 # pylint: disable=redefined-outer-name
|
|
53
53
|
tagged = False
|
|
54
54
|
msgs = {}
|
|
55
55
|
|
|
@@ -58,7 +58,18 @@ async def test_20_all():
|
|
|
58
58
|
async with open_mqttclient(client_id="act_test_%d" % (i,), config=Config) as C:
|
|
59
59
|
T = get_transport("mqtt")(C, "test_20")
|
|
60
60
|
C._tg.start_soon(read_loop, C, T)
|
|
61
|
-
async with Actor(
|
|
61
|
+
async with Actor(
|
|
62
|
+
T,
|
|
63
|
+
"c_" + str(i),
|
|
64
|
+
cfg={
|
|
65
|
+
"nodes": N,
|
|
66
|
+
"gap": 0.15,
|
|
67
|
+
"cycle": 0.2,
|
|
68
|
+
"force_in": True,
|
|
69
|
+
"override": True,
|
|
70
|
+
"splits": N,
|
|
71
|
+
},
|
|
72
|
+
) as k:
|
|
62
73
|
task_status.started()
|
|
63
74
|
await k.set_value(i * 31)
|
|
64
75
|
c = 0
|
|
@@ -82,12 +93,12 @@ async def test_20_all():
|
|
|
82
93
|
if c > 2:
|
|
83
94
|
break
|
|
84
95
|
assert tagged <= 1
|
|
85
|
-
k.logger.
|
|
86
|
-
for x in range(1,
|
|
96
|
+
k.logger.error("N2 %r", k._values)
|
|
97
|
+
for x in range(1, N):
|
|
87
98
|
assert k._values["c_" + str(x)] == x * 31
|
|
88
99
|
|
|
89
100
|
async with trio.open_nursery() as tg:
|
|
90
|
-
for i in range(1,
|
|
101
|
+
for i in range(1, N):
|
|
91
102
|
await tg.start(s1, i)
|
|
92
103
|
|
|
93
104
|
|
|
@@ -109,7 +120,9 @@ async def test_21_some():
|
|
|
109
120
|
T = get_transport("mqtt")(C, "test_21")
|
|
110
121
|
C._tg.start_soon(read_loop, C, T)
|
|
111
122
|
nonlocal c
|
|
112
|
-
async with Actor(
|
|
123
|
+
async with Actor(
|
|
124
|
+
T, "c_" + str(i), cfg={"nodes": 3, "gap": 0.09, "cycle": 0.3, "override": True}
|
|
125
|
+
) as k:
|
|
113
126
|
task_status.started()
|
|
114
127
|
await k.set_value(i * 31)
|
|
115
128
|
async for m in k:
|
|
@@ -2,9 +2,11 @@ from __future__ import annotations
|
|
|
2
2
|
|
|
3
3
|
import logging
|
|
4
4
|
import os
|
|
5
|
-
import pytest
|
|
6
5
|
import time
|
|
7
6
|
|
|
7
|
+
import pytest
|
|
8
|
+
import trio
|
|
9
|
+
|
|
8
10
|
from asyncactor.actor import (
|
|
9
11
|
Actor,
|
|
10
12
|
GoodNodeEvent,
|
|
@@ -14,7 +16,6 @@ from asyncactor.actor import (
|
|
|
14
16
|
)
|
|
15
17
|
from asyncactor.backend import get_transport
|
|
16
18
|
|
|
17
|
-
import trio
|
|
18
19
|
try:
|
|
19
20
|
from moat.lib.mqtt.async_client import AsyncMQTTClient
|
|
20
21
|
except ImportError:
|
|
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
|
|
File without changes
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
#
|
|
4
4
|
from __future__ import annotations
|
|
5
5
|
|
|
6
|
-
from asyncactor.abc import MonitorStream, Transport
|
|
7
|
-
|
|
8
6
|
import msgpack
|
|
9
7
|
from asyncserf import Serf
|
|
10
8
|
|
|
9
|
+
from asyncactor.abc import MonitorStream, Transport
|
|
10
|
+
|
|
11
11
|
|
|
12
12
|
class SerfTransport(Transport):
|
|
13
13
|
def __init__(self, conn: Serf, *topic):
|
|
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
|
|
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
|
|
@@ -5,18 +5,18 @@ try:
|
|
|
5
5
|
except ImportError:
|
|
6
6
|
from async_exit_stack import AsyncExitStack
|
|
7
7
|
from async_generator import asynccontextmanager
|
|
8
|
-
|
|
8
|
+
|
|
9
9
|
import logging
|
|
10
10
|
import time
|
|
11
11
|
from unittest import mock
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
import anyio
|
|
15
14
|
import attr
|
|
16
15
|
import trio
|
|
17
|
-
|
|
18
16
|
from moat.util import create_queue
|
|
19
17
|
|
|
18
|
+
from asyncactor.abc import MonitorStream, Transport
|
|
19
|
+
|
|
20
20
|
logger = logging.getLogger(__name__)
|
|
21
21
|
|
|
22
22
|
otm = time.time
|
|
@@ -2,9 +2,12 @@ from __future__ import annotations
|
|
|
2
2
|
|
|
3
3
|
import logging
|
|
4
4
|
import os
|
|
5
|
-
import pytest
|
|
6
5
|
import time
|
|
7
6
|
|
|
7
|
+
import pytest
|
|
8
|
+
import trio
|
|
9
|
+
from asyncserf import serf_client
|
|
10
|
+
|
|
8
11
|
from asyncactor.actor import (
|
|
9
12
|
Actor,
|
|
10
13
|
GoodNodeEvent,
|
|
@@ -14,9 +17,6 @@ from asyncactor.actor import (
|
|
|
14
17
|
)
|
|
15
18
|
from asyncactor.backend import get_transport
|
|
16
19
|
|
|
17
|
-
import trio
|
|
18
|
-
from asyncserf import serf_client
|
|
19
|
-
|
|
20
20
|
logging.basicConfig(level=logging.INFO)
|
|
21
21
|
|
|
22
22
|
N = 20
|
|
File without changes
|