
This broke code that did e.g. from amaranth.vendor.xilinx import * which is common in amaranth-boards.
17 lines
461 B
Python
17 lines
461 B
Python
# TODO(amaranth-0.5): remove module
|
|
|
|
import warnings
|
|
import importlib
|
|
from .. import vendor
|
|
|
|
|
|
__all__ = ["LatticeMachXO2Platform", "LatticeMachXO3LPlatform"]
|
|
|
|
|
|
def __getattr__(name):
|
|
if name in __all__:
|
|
warnings.warn(f"instead of `{__name__}.{name}`, use `amaranth.vendor.{name}",
|
|
DeprecationWarning, stacklevel=2)
|
|
return getattr(vendor, name)
|
|
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
|