moat-lib-codec 0.4.18__tar.gz → 0.4.19__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 (36) hide show
  1. {moat_lib_codec-0.4.18/src/moat_lib_codec.egg-info → moat_lib_codec-0.4.19}/PKG-INFO +1 -1
  2. {moat_lib_codec-0.4.18 → moat_lib_codec-0.4.19}/debian/changelog +12 -0
  3. {moat_lib_codec-0.4.18 → moat_lib_codec-0.4.19}/pyproject.toml +1 -1
  4. moat_lib_codec-0.4.19/src/moat/lib/codec/null.py +32 -0
  5. {moat_lib_codec-0.4.18 → moat_lib_codec-0.4.19/src/moat_lib_codec.egg-info}/PKG-INFO +1 -1
  6. {moat_lib_codec-0.4.18 → moat_lib_codec-0.4.19}/src/moat_lib_codec.egg-info/SOURCES.txt +1 -0
  7. {moat_lib_codec-0.4.18 → moat_lib_codec-0.4.19}/LICENSE.txt +0 -0
  8. {moat_lib_codec-0.4.18 → moat_lib_codec-0.4.19}/Makefile +0 -0
  9. {moat_lib_codec-0.4.18 → moat_lib_codec-0.4.19}/README.md +0 -0
  10. {moat_lib_codec-0.4.18 → moat_lib_codec-0.4.19}/debian/.gitignore +0 -0
  11. {moat_lib_codec-0.4.18 → moat_lib_codec-0.4.19}/debian/control +0 -0
  12. {moat_lib_codec-0.4.18 → moat_lib_codec-0.4.19}/debian/py3dist-overrides +0 -0
  13. {moat_lib_codec-0.4.18 → moat_lib_codec-0.4.19}/debian/rules +0 -0
  14. {moat_lib_codec-0.4.18 → moat_lib_codec-0.4.19}/setup.cfg +0 -0
  15. {moat_lib_codec-0.4.18 → moat_lib_codec-0.4.19}/src/moat/lib/codec/__init__.py +0 -0
  16. {moat_lib_codec-0.4.18 → moat_lib_codec-0.4.19}/src/moat/lib/codec/_base.py +0 -0
  17. {moat_lib_codec-0.4.18 → moat_lib_codec-0.4.19}/src/moat/lib/codec/_cbor.py +0 -0
  18. {moat_lib_codec-0.4.18 → moat_lib_codec-0.4.19}/src/moat/lib/codec/_moat_cbor.py +0 -0
  19. {moat_lib_codec-0.4.18 → moat_lib_codec-0.4.19}/src/moat/lib/codec/_moat_msgpack.py +0 -0
  20. {moat_lib_codec-0.4.18 → moat_lib_codec-0.4.19}/src/moat/lib/codec/binary.py +0 -0
  21. {moat_lib_codec-0.4.18 → moat_lib_codec-0.4.19}/src/moat/lib/codec/bool.py +0 -0
  22. {moat_lib_codec-0.4.18 → moat_lib_codec-0.4.19}/src/moat/lib/codec/cbor.py +0 -0
  23. {moat_lib_codec-0.4.18 → moat_lib_codec-0.4.19}/src/moat/lib/codec/errors.py +0 -0
  24. {moat_lib_codec-0.4.18 → moat_lib_codec-0.4.19}/src/moat/lib/codec/json.py +0 -0
  25. {moat_lib_codec-0.4.18 → moat_lib_codec-0.4.19}/src/moat/lib/codec/jsonvalstr.py +0 -0
  26. {moat_lib_codec-0.4.18 → moat_lib_codec-0.4.19}/src/moat/lib/codec/jsonvalue.py +0 -0
  27. {moat_lib_codec-0.4.18 → moat_lib_codec-0.4.19}/src/moat/lib/codec/moat_cbor.py +0 -0
  28. {moat_lib_codec-0.4.18 → moat_lib_codec-0.4.19}/src/moat/lib/codec/moat_kv.py +0 -0
  29. {moat_lib_codec-0.4.18 → moat_lib_codec-0.4.19}/src/moat/lib/codec/moat_msgpack.py +0 -0
  30. {moat_lib_codec-0.4.18 → moat_lib_codec-0.4.19}/src/moat/lib/codec/msgpack.py +0 -0
  31. {moat_lib_codec-0.4.18 → moat_lib_codec-0.4.19}/src/moat/lib/codec/noop.py +0 -0
  32. {moat_lib_codec-0.4.18 → moat_lib_codec-0.4.19}/src/moat/lib/codec/utf8.py +0 -0
  33. {moat_lib_codec-0.4.18 → moat_lib_codec-0.4.19}/src/moat/lib/codec/yaml.py +0 -0
  34. {moat_lib_codec-0.4.18 → moat_lib_codec-0.4.19}/src/moat_lib_codec.egg-info/dependency_links.txt +0 -0
  35. {moat_lib_codec-0.4.18 → moat_lib_codec-0.4.19}/src/moat_lib_codec.egg-info/requires.txt +0 -0
  36. {moat_lib_codec-0.4.18 → moat_lib_codec-0.4.19}/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.18
3
+ Version: 0.4.19
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>
@@ -1,3 +1,15 @@
1
+ moat-lib-codec (0.4.19-1) unstable; urgency=medium
2
+
3
+ * New release for 26.1.18
4
+
5
+ -- Matthias Urlichs <matthias@urlichs.de> Wed, 03 Jun 2026 18:49:14 +0200
6
+
7
+ moat-lib-codec (0.4.18-2) unstable; urgency=medium
8
+
9
+ * New release for 26.1.12
10
+
11
+ -- Matthias Urlichs <matthias@urlichs.de> Fri, 24 Apr 2026 15:33:49 +0200
12
+
1
13
  moat-lib-codec (0.4.18-1) unstable; urgency=medium
2
14
 
3
15
  * New release for 26.1.10
@@ -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.18"
28
+ version = "0.4.19"
29
29
 
30
30
  [project.urls]
31
31
  homepage = "https://m-o-a-t.org"
@@ -0,0 +1,32 @@
1
+ """Null codec — accepts only ``None``.
2
+
3
+ This codec exists as a placeholder, e.g. for use in conversion-vector
4
+ trees to mark paths whose payload should be silently dropped by gateways.
5
+ It encodes ``None`` to an empty byte string and refuses any other value.
6
+ Decoding ignores the input and returns ``None``.
7
+ """
8
+
9
+ from __future__ import annotations
10
+
11
+ from ._base import Codec as _Codec
12
+
13
+ from typing import Any
14
+
15
+
16
+ class Codec(_Codec):
17
+ """Codec that only accepts :data:`None` as a value."""
18
+
19
+ def __init__(self, ext: Any | None = None) -> None:
20
+ if ext is not None:
21
+ raise ValueError("You can't extend the null codec")
22
+ super().__init__()
23
+
24
+ def encode(self, obj: Any) -> bytes:
25
+ """Encode :data:`None` to empty bytes; raise otherwise."""
26
+ if obj is None:
27
+ return b""
28
+ raise ValueError(f"The null codec only accepts None, not {obj!r}")
29
+
30
+ def decode(self, data: bytes | bytearray | memoryview) -> None: # noqa: ARG002
31
+ """Discard ``data`` and return :data:`None`."""
32
+ return None
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: moat-lib-codec
3
- Version: 0.4.18
3
+ Version: 0.4.19
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>
@@ -24,6 +24,7 @@ src/moat/lib/codec/moat_kv.py
24
24
  src/moat/lib/codec/moat_msgpack.py
25
25
  src/moat/lib/codec/msgpack.py
26
26
  src/moat/lib/codec/noop.py
27
+ src/moat/lib/codec/null.py
27
28
  src/moat/lib/codec/utf8.py
28
29
  src/moat/lib/codec/yaml.py
29
30
  src/moat_lib_codec.egg-info/PKG-INFO