From ec9da2d4d638d32e09fd845b5469431203e9e9ab Mon Sep 17 00:00:00 2001 From: Catherine Date: Wed, 27 Sep 2023 11:24:09 +0000 Subject: [PATCH] lib.wiring: Component.signature should not be a class method. While the capability of providing signatures for components that are not parametric is useful, most Amaranth gateware is heavily parameterized, and the capability is not worth making most subclasses Liskov-incompatible with the base class (where the derived class would not provide `signature` as a class method anymore). --- amaranth/lib/wiring.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/amaranth/lib/wiring.py b/amaranth/lib/wiring.py index 48351e5..9a9b2ec 100644 --- a/amaranth/lib/wiring.py +++ b/amaranth/lib/wiring.py @@ -782,9 +782,6 @@ class Component(Elaboratable): f"because an attribute with the same name already exists") self.__dict__.update(self.signature.members.create()) - # TODO(py3.9): This should be a class method, but descriptors don't stack this way - # in Python 3.8 and below. - # @classmethod @property def signature(self): cls = type(self)