You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/changes.rst
+3-5Lines changed: 3 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,8 @@ Apply the following changes to code written against Amaranth 0.3 to migrate it t
26
26
* Update shell environment to use ``AMARANTH_*`` environment variables instead of ``NMIGEN_*`` environment variables.
27
27
* Update shell environment to use ``AMARANTH_ENV_<TOOLCHAIN>`` (with all-uppercase ``<TOOLCHAIN>`` name) environment variable names instead of ``AMARANTH_ENV_<Toolchain>`` or ``NMIGEN_ENV_<Toolchain>`` (with mixed-case ``<Toolchain>`` name).
28
28
* Update imports of the form ``from amaranth.vendor.some_vendor import SomeVendorPlatform`` to ``from amaranth.vendor import SomeVendorPlatform``. This change will reduce future churn.
29
+
* Replace uses of ``Const.normalize(value, shape)`` with ``Const(value, shape).value``.
30
+
* Replace uses of ``Repl(value, count)`` with ``value.replicate(count)``.
29
31
30
32
While code that uses the features listed as deprecated below will work in Amaranth 0.4, they will be removed in the next version.
* `RFC 9`_: Constant initialization for shape-castable objects
56
-
* `RFC 8`_: Aggregate extensibility
57
-
* `RFC 9`_: Constant initialization for shape-castable objects
58
56
* `RFC 10`_: Move ``Repl`` to ``Value.replicate``
59
57
* `RFC 18`_: Reorganize vendor platforms
60
58
* `RFC 15`_: Lifting shape-castable objects
@@ -76,7 +74,7 @@ Language changes
76
74
* Changed: :meth:`Value.cast` treats instances of classes derived from both :class:`enum.Enum` and :class:`int` (including :class:`enum.IntEnum`) as enumerations rather than integers.
77
75
* Changed: :meth:`Value.matches` with an empty list of patterns returns ``Const(1)`` rather than ``Const(0)``, to match the behavior of ``with m.Case():``.
78
76
* Changed: :class:`Cat` warns if an enumeration without an explicitly specified shape is used. (`RFC 3`_)
79
-
* Deprecated: :meth:`Const.normalize`. (`RFC 5`_)
77
+
* Deprecated: :meth:`Const.normalize`; use ``Const(value, shape).value`` instead of ``Const.normalize(value, shape)``. (`RFC 5`_)
80
78
* Deprecated: :class:`Repl`; use :meth:`Value.replicate` instead. (`RFC 10`_)
81
79
* Removed: (deprecated in 0.1) casting of :class:`Shape` to and from a ``(width, signed)`` tuple.
82
80
* Removed: (deprecated in 0.3) :class:`ast.UserValue`.
0 commit comments