Control: tags 978544 + pending Dear maintainer,
I've prepared an NMU for python-dbussy (versioned as 1.3-1.1) and uploaded it to DELAYED/1. Please feel free to tell me if I should cancel it. cu Adrian
diff -Nru python-dbussy-1.3/debian/changelog python-dbussy-1.3/debian/changelog --- python-dbussy-1.3/debian/changelog 2020-12-19 23:53:12.000000000 +0200 +++ python-dbussy-1.3/debian/changelog 2021-07-15 14:20:57.000000000 +0300 @@ -1,3 +1,11 @@ +python-dbussy (1.3-1.1) unstable; urgency=medium + + * Non-maintainer upload. + * Backport upstream fix to ensure that Type objects always have + a code field. (Closes: #978544) + + -- Adrian Bunk <[email protected]> Thu, 15 Jul 2021 14:20:57 +0300 + python-dbussy (1.3-1) unstable; urgency=medium * New upstream version. diff -Nru python-dbussy-1.3/debian/patches/0001-Ensure-that-Type-objects-always-have-a-code-field.patch python-dbussy-1.3/debian/patches/0001-Ensure-that-Type-objects-always-have-a-code-field.patch --- python-dbussy-1.3/debian/patches/0001-Ensure-that-Type-objects-always-have-a-code-field.patch 1970-01-01 02:00:00.000000000 +0200 +++ python-dbussy-1.3/debian/patches/0001-Ensure-that-Type-objects-always-have-a-code-field.patch 2021-07-15 14:19:38.000000000 +0300 @@ -0,0 +1,75 @@ +From e131d819ea832bec7cfc9e27e27af9c71f701a5a Mon Sep 17 00:00:00 2001 +From: Lawrence D'Oliveiro <[email protected]> +Date: Thu, 28 May 2020 00:18:05 +0000 +Subject: Ensure that Type objects always have a code field. + +--- + dbussy.py | 19 +++++++++++++++++-- + 1 file changed, 17 insertions(+), 2 deletions(-) + +diff --git a/dbussy.py b/dbussy.py +index 0576695..4c8dc04 100644 +--- a/dbussy.py ++++ b/dbussy.py +@@ -637,6 +637,15 @@ class Type : + "base class for all Types. The “signature” property returns the fully-encoded" \ + " signature string for the entire Type." + ++ __slots__ = ("code",) ++ ++ def __init__(self, code) : ++ if not isinstance(code, TYPE) : ++ raise TypeError("only TYPE.xxx values allowed") ++ #end if ++ self.code = code ++ #end __init__ ++ + @property + def signature(self) : + raise NotImplementedError("subclass forgot to override signature property") +@@ -662,13 +671,13 @@ class Type : + class BasicType(Type) : + "a basic (non-container) type." + +- __slots__ = ("code",) ++ __slots__ = () + + def __init__(self, code) : + if not isinstance(code, TYPE) or not code.is_basic : + raise TypeError("only basic TYPE.xxx values allowed") + #end if +- self.code = code ++ super().__init__(code) + #end __init__ + + def __repr__(self) : +@@ -712,6 +721,10 @@ class BasicType(Type) : + class VariantType(Type) : + "the variant type--a single element of a type determined at run-time." + ++ def __init__(self) : ++ super().__init__(TYPE.VARIANT) ++ #end __init__ ++ + @property + def signature(self) : + return \ +@@ -752,6 +765,7 @@ class StructType(Type) : + if not all(isinstance(t, Type) for t in types) : + raise TypeError("struct elements must be Types") + #end if ++ super().__init__(TYPE.STRUCT) + self.elttypes = tuple(types) + #end __init__ + +@@ -799,6 +813,7 @@ class ArrayType(Type) : + if not isinstance(elttype, Type) : + raise TypeError("invalid array element type") + #end if ++ super().__init__(TYPE.ARRAY) + self.elttype = elttype + #end __init__ + +-- +2.20.1 + diff -Nru python-dbussy-1.3/debian/patches/series python-dbussy-1.3/debian/patches/series --- python-dbussy-1.3/debian/patches/series 1970-01-01 02:00:00.000000000 +0200 +++ python-dbussy-1.3/debian/patches/series 2021-07-15 14:20:52.000000000 +0300 @@ -0,0 +1 @@ +0001-Ensure-that-Type-objects-always-have-a-code-field.patch

