moat-kv-ow 0.9.2__tar.gz → 0.9.4__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.
Files changed (25) hide show
  1. {moat-kv-ow-0.9.2/moat_kv_ow.egg-info → moat-kv-ow-0.9.4}/PKG-INFO +1 -1
  2. {moat-kv-ow-0.9.2 → moat-kv-ow-0.9.4}/moat/kv/ow/model.py +6 -8
  3. {moat-kv-ow-0.9.2 → moat-kv-ow-0.9.4/moat_kv_ow.egg-info}/PKG-INFO +1 -1
  4. {moat-kv-ow-0.9.2 → moat-kv-ow-0.9.4}/.gitignore +0 -0
  5. {moat-kv-ow-0.9.2 → moat-kv-ow-0.9.4}/.pylintrc +0 -0
  6. {moat-kv-ow-0.9.2 → moat-kv-ow-0.9.4}/Makefile +0 -0
  7. {moat-kv-ow-0.9.2 → moat-kv-ow-0.9.4}/README.rst +0 -0
  8. {moat-kv-ow-0.9.2 → moat-kv-ow-0.9.4}/TODO.rst +0 -0
  9. {moat-kv-ow-0.9.2 → moat-kv-ow-0.9.4}/USAGE.rst +0 -0
  10. {moat-kv-ow-0.9.2 → moat-kv-ow-0.9.4}/moat/kv/ow/__init__.py +0 -0
  11. {moat-kv-ow-0.9.2 → moat-kv-ow-0.9.4}/moat/kv/ow/_config.yaml +0 -0
  12. {moat-kv-ow-0.9.2 → moat-kv-ow-0.9.4}/moat/kv/ow/_main.py +0 -0
  13. {moat-kv-ow-0.9.2 → moat-kv-ow-0.9.4}/moat/kv/ow/mock.py +0 -0
  14. {moat-kv-ow-0.9.2 → moat-kv-ow-0.9.4}/moat/kv/ow/task.py +0 -0
  15. {moat-kv-ow-0.9.2 → moat-kv-ow-0.9.4}/moat-kv-ow@.service +0 -0
  16. {moat-kv-ow-0.9.2 → moat-kv-ow-0.9.4}/moat_kv_ow.egg-info/SOURCES.txt +0 -0
  17. {moat-kv-ow-0.9.2 → moat-kv-ow-0.9.4}/moat_kv_ow.egg-info/dependency_links.txt +0 -0
  18. {moat-kv-ow-0.9.2 → moat-kv-ow-0.9.4}/moat_kv_ow.egg-info/requires.txt +0 -0
  19. {moat-kv-ow-0.9.2 → moat-kv-ow-0.9.4}/moat_kv_ow.egg-info/top_level.txt +0 -0
  20. {moat-kv-ow-0.9.2 → moat-kv-ow-0.9.4}/pyproject.toml +0 -0
  21. {moat-kv-ow-0.9.2 → moat-kv-ow-0.9.4}/setup.cfg +0 -0
  22. {moat-kv-ow-0.9.2 → moat-kv-ow-0.9.4}/tests/__init__.py +0 -0
  23. {moat-kv-ow-0.9.2 → moat-kv-ow-0.9.4}/tests/conftest.py +0 -0
  24. {moat-kv-ow-0.9.2 → moat-kv-ow-0.9.4}/tests/test_alarm.py +0 -0
  25. {moat-kv-ow-0.9.2 → moat-kv-ow-0.9.4}/tools/update-0-4.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: moat-kv-ow
3
- Version: 0.9.2
3
+ Version: 0.9.4
4
4
  Summary: 1wire connector for MoaT-KV
5
5
  Author-email: Matthias Urlichs <matthias@urlichs.de>
6
6
  Project-URL: homepage, https://m-o-a-t.org
@@ -60,13 +60,11 @@ class OWFSattr(ClientEntry):
60
60
  src_attr = val.get("src_attr", ())
61
61
  if force or src != self.watch_src:
62
62
  if self.watch_src_scope is not None:
63
- await self.watch_src_scope.cancel()
63
+ self.watch_src_scope.cancel()
64
64
  self.watch_src = src
65
65
  self.watch_src_attr = src_attr
66
66
  if src is not None:
67
- evt = anyio.Event()
68
- await self.root._tg.spawn(self._watch_src, evt)
69
- await evt.wait()
67
+ await self.root._tg.start(self._watch_src)
70
68
  else:
71
69
  await self.root.err.record_working(
72
70
  "owfs", self.subpath + ("write",), comment="dropped"
@@ -130,20 +128,20 @@ class OWFSattr(ClientEntry):
130
128
  else:
131
129
  await self.root.err.record_working("owfs", self.subpath + ("read",))
132
130
 
133
- async def _watch_src(self, evt):
131
+ async def _watch_src(self, task_status=anyio.TASK_STATUS_IGNORED):
134
132
  """
135
133
  Task that monitors one entry and writes its value to the 1wire
136
134
  device.
137
135
  """
138
- async with anyio.open_cancel_scope() as sc:
136
+ with anyio.CancelScope() as sc:
139
137
  try:
140
138
  async with self.client.watch(
141
139
  self.watch_src, min_depth=0, max_depth=0, fetch=True
142
140
  ) as wp:
143
141
  if self.watch_src_scope is not None:
144
- await self.watch_src_scope.cancel()
142
+ self.watch_src_scope.cancel()
145
143
  self.watch_src_scope = sc
146
- evt.set()
144
+ task_status.started()
147
145
 
148
146
  async for msg in wp:
149
147
  logger.debug("Process %r", msg)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: moat-kv-ow
3
- Version: 0.9.2
3
+ Version: 0.9.4
4
4
  Summary: 1wire connector for MoaT-KV
5
5
  Author-email: Matthias Urlichs <matthias@urlichs.de>
6
6
  Project-URL: homepage, https://m-o-a-t.org
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