amaranth/amaranth/vendor/lattice_machxo_2_3l.py
Catherine 7f1397b281 vendor/*: add missing __all__.
This broke code that did e.g.

    from amaranth.vendor.xilinx import *

which is common in amaranth-boards.
2023-09-01 01:30:46 +00:00

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}")