From: whitequark Date: Fri, 14 Dec 2018 16:00:31 +0000 (+0000) Subject: compat.fhdl.module: update deprecation messages. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fbe4bbc12921cf2ad305ec25442bbfd988996edc;p=nmigen.git compat.fhdl.module: update deprecation messages. --- 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 +=`")