moat-kv 0.70.15__py3-none-any.whl → 0.70.18__py3-none-any.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.
moat/kv/__init__.py CHANGED
@@ -3,10 +3,13 @@
3
3
  __path__ = __import__("pkgutil").extend_path(__path__, __name__)
4
4
 
5
5
  try:
6
+ import warning
6
7
  import pkg_resources # part of setuptools
7
8
 
8
- _version = pkg_resources.require("moat.kv")[0].version
9
+ with warnings.filterwarnings("ignore"):
10
+ _version = pkg_resources.require("moat.kv")[0].version
9
11
  del pkg_resources
12
+ del warnings
10
13
 
11
14
  _version_tuple = tuple(int(x) for x in _version.split("."))
12
15
 
moat/kv/client.py CHANGED
@@ -535,6 +535,7 @@ class Client:
535
535
 
536
536
  except BaseException as exc:
537
537
  logger.warning("Reader died: %r", exc, exc_info=exc)
538
+ raise
538
539
  finally:
539
540
  with anyio.fail_after(2, shield=True):
540
541
  hdl, self._handlers = self._handlers, None
moat/kv/mock/__init__.py CHANGED
@@ -93,5 +93,5 @@ class S:
93
93
  args = args.split(" ")
94
94
  async with scope.using_scope():
95
95
  return await run(
96
- "-v", "-v", "kv", "-h", h, "-p", p, *args, do_stdout=do_stdout
96
+ "-VV", "kv", "-h", h, "-p", p, *args, do_stdout=do_stdout
97
97
  )
moat/kv/runner.py CHANGED
@@ -556,7 +556,7 @@ class RunnerEntry(AttrClientEntry):
556
556
  raise RuntimeError(f"already running on {state.node}")
557
557
  code = self.root.code.follow(self.code, create=False)
558
558
  data = combine_dict(
559
- self.data or {}, code.value.get("default", {}), deep=True
559
+ self.data or {}, {} if code.value is NotGiven else code.value.get("default", {}), deep=True
560
560
  )
561
561
 
562
562
  if code.is_async:
@@ -793,7 +793,10 @@ class StateEntry(AttrClientEntry):
793
793
  await self.delete()
794
794
  return
795
795
 
796
- if self.node is None or self.node != self.root.name:
796
+ if self.node is None:
797
+ return
798
+ if self.node != self.root.name:
799
+ self.root.runner.get_node(self.node)
797
800
  return
798
801
 
799
802
  self.stopped = time.time()
@@ -1173,7 +1176,7 @@ class AnyRunnerRoot(_BaseRunnerRoot):
1173
1176
  self._stale_times.append(cur)
1174
1177
  if self._stale_times[0] > cur - self.max_age:
1175
1178
  return
1176
- if len(self._stale_times) < 5:
1179
+ if len(self._stale_times) <= 2*self._cfg["actor"]["n_hosts"]+1:
1177
1180
  return
1178
1181
  cut = self._stale_times.pop(0)
1179
1182
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: moat-kv
3
- Version: 0.70.15
3
+ Version: 0.70.18
4
4
  Summary: A distributed no-master key-value store
5
5
  Author-email: Matthias Urlichs <matthias@urlichs.de>
6
6
  Project-URL: homepage, https://m-o-a-t.org
@@ -25,12 +25,12 @@ License-File: LICENSE
25
25
  License-File: LICENSE.APACHE2
26
26
  License-File: LICENSE.MIT
27
27
  Requires-Dist: PyNaCl (>=1.3)
28
- Requires-Dist: anyio (>=3)
29
- Requires-Dist: asyncactor (>=0.21)
28
+ Requires-Dist: anyio (>=4)
29
+ Requires-Dist: asyncactor (>=0.24)
30
30
  Requires-Dist: asyncclick (>7.99)
31
31
  Requires-Dist: asyncscope (>=0.10.4)
32
32
  Requires-Dist: asyncserf (>=0.16)
33
- Requires-Dist: attrs (>=20)
33
+ Requires-Dist: attrs (>=22)
34
34
  Requires-Dist: jsonschema (>=2.5)
35
35
  Requires-Dist: moat-lib-diffiehellman (~=0.13.1.6)
36
36
  Requires-Dist: moat-mqtt (~=0.39.4)
@@ -39,7 +39,7 @@ Requires-Dist: psutil
39
39
  Requires-Dist: range-set (>=0.2)
40
40
  Requires-Dist: ruyaml (>=0.89)
41
41
  Requires-Dist: simpleeval (>=0.9.10)
42
- Requires-Dist: trio (>=0.18)
42
+ Requires-Dist: trio (>=0.22)
43
43
  Requires-Dist: exceptiongroup ; python_version < "3.11"
44
44
  Provides-Extra: dev
45
45
  Requires-Dist: moat-src (>=0.5.0) ; extra == 'dev'
@@ -1,7 +1,7 @@
1
- moat/kv/__init__.py,sha256=9EQmK-kcd-zLiyjJVlMDdKRbT2QuSL2Vaqx6dmbTelM,389
1
+ moat/kv/__init__.py,sha256=O37OW612tpgM6wOu7x4xXjRC36yPEqVlagrPm54XiMA,473
2
2
  moat/kv/_config.yaml,sha256=hr3FBd85Mzk0UmrFjvFiPLYsLKuezp8MAi6RsSOdCZc,2431
3
3
  moat/kv/_main.py,sha256=2gKcbjL0ilxJiRTttG1LYr3XtbepuL7CWavVUrSUqY0,2266
4
- moat/kv/client.py,sha256=FFLoXhQt60qAWIPexNQ7X7zLR7-Smq9UFMuY7riaqzk,34933
4
+ moat/kv/client.py,sha256=hslUcWIY_2UG_CqNR0QTKMU-udHTsWuNx-WNdPtsIcs,34955
5
5
  moat/kv/code.py,sha256=80vM87My-0tGi5pSrSyzilDUXkMhQxPjXa-1781-af0,6296
6
6
  moat/kv/codec.py,sha256=g8ob7SGhYaM0KXNy6AXGbCIhd0c8aQUUuwCs3NHtGP8,249
7
7
  moat/kv/config.py,sha256=fLB4vRHuauzmJlLHux6vwnKnn7dIJdKzV8Ize8lNymw,1057
@@ -9,7 +9,7 @@ moat/kv/data.py,sha256=XZ4016Enl8pIvjFi2rfsz-j6ZuYle8gALUmNYcVXDbU,6010
9
9
  moat/kv/errors.py,sha256=UFIsCZVZSczclwc1V98AyyuWFn-YDuMwLCbFNswdCVw,16669
10
10
  moat/kv/exceptions.py,sha256=ocujmWDhDD5O3R4xbUeYoQCP6Gq98CxR200su7tKSU0,1845
11
11
  moat/kv/model.py,sha256=8VralxKSVg5sYj0FS5uCoaIQCIndVJWtSL4A2dTAd4Y,33497
12
- moat/kv/runner.py,sha256=UK7VJ8lPB1Lyxkm3wOFkLP5rYlPnXwDb_HYQs4EZVW4,41825
12
+ moat/kv/runner.py,sha256=1jSxRh52sonR6Pll2NdgotVqRIvJRud3j4PMepcLQs4,41969
13
13
  moat/kv/server.py,sha256=wrtGiJdzgm2IWFdsA6vcX5ex-bmIfpFCaPRxImMGOB8,95045
14
14
  moat/kv/types.py,sha256=CASTyHTM9QuEu_QqTdV8jekyKwzvHiaNYc4rB9R5kOc,14127
15
15
  moat/kv/actor/__init__.py,sha256=kBF-7eRZnveIlCgfeHvYzY5WYH8mgFus1J3BRBy0D0M,2107
@@ -34,16 +34,16 @@ moat/kv/command/log.py,sha256=wmFlsHHvI8aIEQg-Y0ixdSB4MPydYa6VECjue8LLYuI,1315
34
34
  moat/kv/command/server.py,sha256=UkO4CIONUahjKQSNDUCm-7kxROyfSbQJYH_azoN8Mtg,3379
35
35
  moat/kv/command/type.py,sha256=tTrhRO3JyBVqe62TE7aPYuC7U7l1gmPpvWMRLEQw2y4,6135
36
36
  moat/kv/command/dump/__init__.py,sha256=LHmg2yPCFWbTewvy1c3NWOAkuN7s_91-IAhxRTkvv8c,3943
37
- moat/kv/mock/__init__.py,sha256=ivOAJU1ItI7Y8x3T4Rc1HZWhwf1lelopk-AE9RO9eJM,2710
37
+ moat/kv/mock/__init__.py,sha256=HjfD4yARRMZwPDIIXlg_rgYdK4MvFUY5-ch62nfcp9o,2705
38
38
  moat/kv/mock/mqtt.py,sha256=9x5vqCHVRGelcxuDorouZdBfk0xlI6mHykAKdEhiCMg,5313
39
39
  moat/kv/mock/serf.py,sha256=5gYCjV8XHOa4Af9H9sphll4ypOx4By2TKsNmmA4wcEg,7665
40
40
  moat/kv/mock/tracer.py,sha256=TNfvdSP-3QFqu4m8UNK0VxLBhKwEAYe0C64Cf0as4Bg,2058
41
41
  moat/kv/obj/__init__.py,sha256=-AyCPFfepS0xsQllnD6o13bs2rewuErWCgkGkE1PWcQ,19654
42
42
  moat/kv/obj/command.py,sha256=2Z3P6-a7emxPoNJoFvfc1362DN26XHEKfWbij-RmDqY,7575
43
- moat_kv-0.70.15.dist-info/LICENSE,sha256=ZSyHhIjRRWNh4Iw_hgf9e6WYkqFBA9Fczk_5PIW1zIs,185
44
- moat_kv-0.70.15.dist-info/LICENSE.APACHE2,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
45
- moat_kv-0.70.15.dist-info/LICENSE.MIT,sha256=Pm2uVV65J4f8gtHUg1Vnf0VMf2Wus40_nnK_mj2vA0s,1046
46
- moat_kv-0.70.15.dist-info/METADATA,sha256=FzrY5GIbKAI83e2bAlQZUShP-0uWFiBDr1xfRMLip8Y,3569
47
- moat_kv-0.70.15.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
48
- moat_kv-0.70.15.dist-info/top_level.txt,sha256=pcs9fl5w5AB5GVi4SvBqIVmFrkRwQkVw_dEvW0Q0cSA,5
49
- moat_kv-0.70.15.dist-info/RECORD,,
43
+ moat_kv-0.70.18.dist-info/LICENSE,sha256=ZSyHhIjRRWNh4Iw_hgf9e6WYkqFBA9Fczk_5PIW1zIs,185
44
+ moat_kv-0.70.18.dist-info/LICENSE.APACHE2,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
45
+ moat_kv-0.70.18.dist-info/LICENSE.MIT,sha256=Pm2uVV65J4f8gtHUg1Vnf0VMf2Wus40_nnK_mj2vA0s,1046
46
+ moat_kv-0.70.18.dist-info/METADATA,sha256=O5EqDcM2DKAU-CnQgNPHNIo2ciC31QfaNmsEsl8HX10,3569
47
+ moat_kv-0.70.18.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
48
+ moat_kv-0.70.18.dist-info/top_level.txt,sha256=pcs9fl5w5AB5GVi4SvBqIVmFrkRwQkVw_dEvW0Q0cSA,5
49
+ moat_kv-0.70.18.dist-info/RECORD,,