moat-lib-codec 0.4.14__tar.gz → 0.4.16__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 (34) hide show
  1. {moat_lib_codec-0.4.14/src/moat_lib_codec.egg-info → moat_lib_codec-0.4.16}/PKG-INFO +4 -4
  2. {moat_lib_codec-0.4.14 → moat_lib_codec-0.4.16}/debian/changelog +21 -3
  3. {moat_lib_codec-0.4.14 → moat_lib_codec-0.4.16}/pyproject.toml +4 -4
  4. {moat_lib_codec-0.4.14 → moat_lib_codec-0.4.16}/src/moat/lib/codec/_cbor.py +11 -6
  5. {moat_lib_codec-0.4.14 → moat_lib_codec-0.4.16}/src/moat/lib/codec/errors.py +1 -0
  6. {moat_lib_codec-0.4.14 → moat_lib_codec-0.4.16/src/moat_lib_codec.egg-info}/PKG-INFO +4 -4
  7. moat_lib_codec-0.4.16/src/moat_lib_codec.egg-info/requires.txt +5 -0
  8. moat_lib_codec-0.4.14/src/moat_lib_codec.egg-info/requires.txt +0 -5
  9. {moat_lib_codec-0.4.14 → moat_lib_codec-0.4.16}/LICENSE.txt +0 -0
  10. {moat_lib_codec-0.4.14 → moat_lib_codec-0.4.16}/Makefile +0 -0
  11. {moat_lib_codec-0.4.14 → moat_lib_codec-0.4.16}/README.md +0 -0
  12. {moat_lib_codec-0.4.14 → moat_lib_codec-0.4.16}/debian/.gitignore +0 -0
  13. {moat_lib_codec-0.4.14 → moat_lib_codec-0.4.16}/debian/control +0 -0
  14. {moat_lib_codec-0.4.14 → moat_lib_codec-0.4.16}/debian/py3dist-overrides +0 -0
  15. {moat_lib_codec-0.4.14 → moat_lib_codec-0.4.16}/debian/rules +0 -0
  16. {moat_lib_codec-0.4.14 → moat_lib_codec-0.4.16}/setup.cfg +0 -0
  17. {moat_lib_codec-0.4.14 → moat_lib_codec-0.4.16}/src/moat/lib/codec/__init__.py +0 -0
  18. {moat_lib_codec-0.4.14 → moat_lib_codec-0.4.16}/src/moat/lib/codec/_base.py +0 -0
  19. {moat_lib_codec-0.4.14 → moat_lib_codec-0.4.16}/src/moat/lib/codec/_moat_cbor.py +0 -0
  20. {moat_lib_codec-0.4.14 → moat_lib_codec-0.4.16}/src/moat/lib/codec/_moat_msgpack.py +0 -0
  21. {moat_lib_codec-0.4.14 → moat_lib_codec-0.4.16}/src/moat/lib/codec/binary.py +0 -0
  22. {moat_lib_codec-0.4.14 → moat_lib_codec-0.4.16}/src/moat/lib/codec/bool.py +0 -0
  23. {moat_lib_codec-0.4.14 → moat_lib_codec-0.4.16}/src/moat/lib/codec/cbor.py +0 -0
  24. {moat_lib_codec-0.4.14 → moat_lib_codec-0.4.16}/src/moat/lib/codec/json.py +0 -0
  25. {moat_lib_codec-0.4.14 → moat_lib_codec-0.4.16}/src/moat/lib/codec/moat_cbor.py +0 -0
  26. {moat_lib_codec-0.4.14 → moat_lib_codec-0.4.16}/src/moat/lib/codec/moat_kv.py +0 -0
  27. {moat_lib_codec-0.4.14 → moat_lib_codec-0.4.16}/src/moat/lib/codec/moat_msgpack.py +0 -0
  28. {moat_lib_codec-0.4.14 → moat_lib_codec-0.4.16}/src/moat/lib/codec/msgpack.py +0 -0
  29. {moat_lib_codec-0.4.14 → moat_lib_codec-0.4.16}/src/moat/lib/codec/noop.py +0 -0
  30. {moat_lib_codec-0.4.14 → moat_lib_codec-0.4.16}/src/moat/lib/codec/utf8.py +0 -0
  31. {moat_lib_codec-0.4.14 → moat_lib_codec-0.4.16}/src/moat/lib/codec/yaml.py +0 -0
  32. {moat_lib_codec-0.4.14 → moat_lib_codec-0.4.16}/src/moat_lib_codec.egg-info/SOURCES.txt +0 -0
  33. {moat_lib_codec-0.4.14 → moat_lib_codec-0.4.16}/src/moat_lib_codec.egg-info/dependency_links.txt +0 -0
  34. {moat_lib_codec-0.4.14 → moat_lib_codec-0.4.16}/src/moat_lib_codec.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: moat-lib-codec
3
- Version: 0.4.14
3
+ Version: 0.4.16
4
4
  Summary: A simple command/stream multiplexer
5
5
  Author-email: Matthias Urlichs <matthias@urlichs.de>
6
6
  Maintainer-email: Matthias Urlichs <matthias@urlichs.de>
@@ -17,8 +17,8 @@ Requires-Python: >=3.8
17
17
  Description-Content-Type: text/x-rst
18
18
  License-File: LICENSE.txt
19
19
  Requires-Dist: anyio~=4.2
20
- Requires-Dist: moat-lib-rpc~=0.6.1
21
- Requires-Dist: moat-lib-micro~=0.2.2
20
+ Requires-Dist: moat-lib-rpc~=0.7.0
21
+ Requires-Dist: moat-lib-micro~=0.3.0
22
22
  Requires-Dist: moat-lib-proxy~=0.1.1
23
- Requires-Dist: moat-util~=0.62.6
23
+ Requires-Dist: moat-util~=0.63.0
24
24
  Dynamic: license-file
@@ -1,8 +1,26 @@
1
- moat-lib-codec (0.4.14-1) unstable; urgency=medium
1
+ moat-lib-codec (0.4.16-1) unstable; urgency=medium
2
2
 
3
- * New release for 26.0.1
3
+ * New release for 26.0.18
4
+
5
+ -- Matthias Urlichs <matthias@urlichs.de> Mon, 16 Mar 2026 21:27:49 +0100
6
+
7
+ moat-lib-codec (0.4.15-2) unstable; urgency=medium
8
+
9
+ * New release for 26.0.12
10
+
11
+ -- Matthias Urlichs <matthias@urlichs.de> Wed, 04 Mar 2026 10:58:14 +0100
12
+
13
+ moat-lib-codec (0.4.15-1) unstable; urgency=medium
14
+
15
+ * New release for 26.0.11
16
+
17
+ -- Matthias Urlichs <matthias@urlichs.de> Mon, 02 Mar 2026 11:19:14 +0100
18
+
19
+ moat-lib-codec (0.4.14-2) unstable; urgency=medium
20
+
21
+ * New release for 26.0.3
4
22
 
5
- -- Matthias Urlichs <matthias@urlichs.de> Wed, 18 Feb 2026 18:28:41 +0100
23
+ -- Matthias Urlichs <matthias@urlichs.de> Thu, 19 Feb 2026 14:05:17 +0100
6
24
 
7
25
  moat-lib-codec (0.4.14-1) unstable; urgency=medium
8
26
 
@@ -13,10 +13,10 @@ classifiers = [
13
13
  ]
14
14
  dependencies = [
15
15
  "anyio ~= 4.2",
16
- "moat-lib-rpc ~= 0.6.1",
17
- "moat-lib-micro ~= 0.2.2",
16
+ "moat-lib-rpc ~= 0.7.0",
17
+ "moat-lib-micro ~= 0.3.0",
18
18
  "moat-lib-proxy ~= 0.1.1",
19
- "moat-util ~= 0.62.6",
19
+ "moat-util ~= 0.63.0",
20
20
  ]
21
21
  keywords = ["MoaT"]
22
22
  requires-python = ">=3.8"
@@ -25,7 +25,7 @@ maintainers = [{email = "matthias@urlichs.de",name = "Matthias Urlichs"}]
25
25
  description='A simple command/stream multiplexer'
26
26
  readme = "README.rst"
27
27
  authors = [{email = "matthias@urlichs.de",name = "Matthias Urlichs"}]
28
- version = "0.4.14"
28
+ version = "0.4.16"
29
29
 
30
30
  [project.urls]
31
31
  homepage = "https://m-o-a-t.org"
@@ -5,6 +5,7 @@ plus an unpacker factory for streams.
5
5
 
6
6
  from __future__ import annotations
7
7
 
8
+ import math
8
9
  import struct
9
10
 
10
11
  from moat.util import OutOfData
@@ -403,16 +404,20 @@ class Codec(_Codec):
403
404
  # Some special cases of CBOR_7 best handled by special struct.unpack logic here
404
405
  if tb == CBOR_FLOAT16:
405
406
  data = self._read(2)
406
- pf = struct.unpack_from("!e", data, 0)
407
- return pf[0]
407
+ pf = struct.unpack_from("!e", data, 0)[0]
408
+ if pf != 0:
409
+ pf = round(pf, int(4 - math.log10(abs(pf))))
410
+ return pf
408
411
  elif tb == CBOR_FLOAT32:
409
412
  data = self._read(4)
410
- pf = struct.unpack_from("!f", data, 0)
411
- return pf[0]
413
+ pf = struct.unpack_from("!f", data, 0)[0]
414
+ if pf != 0:
415
+ pf = round(pf, int(8 - math.log10(abs(pf))))
416
+ return pf
412
417
  elif tb == CBOR_FLOAT64:
413
418
  data = self._read(8)
414
- pf = struct.unpack_from("!d", data, 0)
415
- return pf[0]
419
+ pf = struct.unpack_from("!d", data, 0)[0]
420
+ return pf
416
421
 
417
422
  tag, aux = self._dec_tag_aux(tb)
418
423
 
@@ -68,6 +68,7 @@ except NameError:
68
68
  as_proxy("_FxErr", FileExistsError)
69
69
 
70
70
  as_proxy("_KyErr", KeyError)
71
+ as_proxy("_ValErr", ValueError)
71
72
  as_proxy("_EKyErr", ExpKeyError)
72
73
  as_proxy("_IdxErr", IndexError)
73
74
  as_proxy("_AtErr", AttributeError)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: moat-lib-codec
3
- Version: 0.4.14
3
+ Version: 0.4.16
4
4
  Summary: A simple command/stream multiplexer
5
5
  Author-email: Matthias Urlichs <matthias@urlichs.de>
6
6
  Maintainer-email: Matthias Urlichs <matthias@urlichs.de>
@@ -17,8 +17,8 @@ Requires-Python: >=3.8
17
17
  Description-Content-Type: text/x-rst
18
18
  License-File: LICENSE.txt
19
19
  Requires-Dist: anyio~=4.2
20
- Requires-Dist: moat-lib-rpc~=0.6.1
21
- Requires-Dist: moat-lib-micro~=0.2.2
20
+ Requires-Dist: moat-lib-rpc~=0.7.0
21
+ Requires-Dist: moat-lib-micro~=0.3.0
22
22
  Requires-Dist: moat-lib-proxy~=0.1.1
23
- Requires-Dist: moat-util~=0.62.6
23
+ Requires-Dist: moat-util~=0.63.0
24
24
  Dynamic: license-file
@@ -0,0 +1,5 @@
1
+ anyio~=4.2
2
+ moat-lib-micro~=0.3.0
3
+ moat-lib-proxy~=0.1.1
4
+ moat-lib-rpc~=0.7.0
5
+ moat-util~=0.63.0
@@ -1,5 +0,0 @@
1
- anyio~=4.2
2
- moat-lib-micro~=0.2.2
3
- moat-lib-proxy~=0.1.1
4
- moat-lib-rpc~=0.6.1
5
- moat-util~=0.62.6