From 15ee85d8a4c71ae3594e9fa9d5d81b15e057afe2 Mon Sep 17 00:00:00 2001 From: Rudd-O Date: Tue, 31 Mar 2026 23:11:03 +0000 Subject: [PATCH 1/2] Add 'print-scaling' tag to IppTag.KEYWORD Without this, print scaling values are ignored. Note it should be possible for implementers of PyIPP-based clients to specify the tag they want as part of the value in the dictionary. Sad it isn't possible currently, but please consider changing the API to permit this. --- src/pyipp/tags.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pyipp/tags.py b/src/pyipp/tags.py index af343020a..90ed8d22b 100644 --- a/src/pyipp/tags.py +++ b/src/pyipp/tags.py @@ -62,4 +62,5 @@ "media": IppTag.NAME, "center-of-pixel": IppTag.BOOLEAN, "sides": IppTag.KEYWORD, + "print-scaling": IppTag.KEYWORD, } From 28f9721d315fac89b911b63d4c66f41de5386ea4 Mon Sep 17 00:00:00 2001 From: Rudd-O Date: Tue, 31 Mar 2026 23:12:44 +0000 Subject: [PATCH 2/2] Warn on unknown tags This should not be a silent error. --- src/pyipp/serializer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pyipp/serializer.py b/src/pyipp/serializer.py index 3a9df1b66..690616ca6 100644 --- a/src/pyipp/serializer.py +++ b/src/pyipp/serializer.py @@ -36,7 +36,7 @@ def construct_attribute(name: str, value: Any, tag: IppTag | None = None) -> byt byte_str = b"" if not tag and not (tag := ATTRIBUTE_TAG_MAP.get(name, None)): - _LOGGER.debug("Unknown IppTag for %s", name) + _LOGGER.warning("Unknown IppTag for %s", name) return byte_str if isinstance(value, (list, tuple, set)):