Mutability of Field isn't specified by the RFC and can cause issues
if the objects stored in Layout subclasses are mutated. There isn't
any reason to do that (the subclasses themselves are mutable and
handle that correctly), so disallow it.
The custom setuptools_scm configuration is removed. It was buggy (for
the case of a dirty worktree exactly at the tag, it did not append
`+dirty`) and otherwise is only different from node-and-timestamp by
appending `.dirty` instead of `.dYYYYMMDDHHMMSS`. The latter is
preferable anyway.
The default name is more commonly returned on code such as:
x, y = Signal(), Signal()
The case where the opcode is not recognized is only encountered
when older Amaranth is ran on a newer Python interpreter (with more
opcodes).
Returning None instead of a name here caused issues in the RTLIL
backend, which would incorrectly use $\d+ names for ports, since
the RTLIL backend assumed the name of a signal is always a string.
Fixes#733.
Starting with setuptools 64.0.2, the monkeypatching process performed as
part of its bootstrap no longer imports distutils.ccompiler, causing an
AttributeError.
Current the value compiler translates ArrayProxy into if-elif trees
which can cause the compiler to crash due to deep recursion (#359).
After this commit, it instead translates them into pattern matching
when it is supported (on Python >= 3.10) to avoid this problem.
Formatting large ints to decimal raises an ValueError in Python versions
that include a mitigation for CVE-2020-10735. Formatting to hexadecimal
instead avoids the algorithmic complexity and is not impacted by the
new conversion limits.
Note that the simulator already rejects very large values, but the
integer-string conversion limits trigger in cases that previously
worked.
These operators are ignored when they are encountered on LHS, as
the signedness of the assignment target does not matter in Amaranth.
.as_signed() appears on LHS of assigns to signed aggregate fields.