From fbe4bbc12921cf2ad305ec25442bbfd988996edc Mon Sep 17 00:00:00 2001 From: whitequark Date: Fri, 14 Dec 2018 16:00:31 +0000 Subject: [PATCH] compat.fhdl.module: update deprecation messages. --- nmigen/compat/fhdl/module.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/nmigen/compat/fhdl/module.py b/nmigen/compat/fhdl/module.py index 1a73a25..aa8d067 100644 --- a/nmigen/compat/fhdl/module.py +++ b/nmigen/compat/fhdl/module.py @@ -59,21 +59,21 @@ class _CompatModuleSync(_CompatModuleProxy): class _CompatModuleSpecials(_CompatModuleProxy): - @deprecated("TODO") + @deprecated("instead of `self.specials. =`, use `m.submodules. =`") def __setattr__(self, name, value): - self.__iadd__(value) + self._cm._submodules += (name, value) setattr(self._cm, name, value) - @deprecated("TODO") + @deprecated("instead of `self.specials +=`, use `m.submodules +=`") def __iadd__(self, other): - self._cm._fragment.specials |= set(_flat_list(other)) + self._cm._submodules += [(None, e) for e in _flat_list(other)] return self class _CompatModuleSubmodules(_CompatModuleProxy): - @deprecated("instead of `self.submodules. =`, use `m.submodules. =`") + @deprecated("instead of `self.submodules. =`, use `m.submodules. =`") def __setattr__(self, name, value): - self._cm._submodules += [(name, e) for e in _flat_list(value)] + self._cm._submodules += (name, value) setattr(self._cm, name, value) @deprecated("instead of `self.submodules +=`, use `m.submodules +=`") -- 2.30.2