Open pavel-kirienko opened 1 year ago
I would like to summon @samcrow for commentary.
This looks good overall and not very difficult to add to other implementations.
May I inquire if there's anything keeping this PR from being merged?
Blocked on this https://github.com/OpenCyphal/nunavut/issues/301
On Sun, Jul 2, 2023, 20:22 Alexander Entinger @.***> wrote:
May I inquire if there's anything keeping this PR from being merged?
— Reply to this email directly, view it on GitHub https://github.com/OpenCyphal/pydsdl/pull/97#issuecomment-1616740185, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZFIZCHRAXUNTKY5OCVGGLXOGU6FANCNFSM6AAAAAAXTPDSR4 . You are receiving this because you were assigned.Message ID: @.***>
Implement string and byte array support as described in https://github.com/OpenCyphal/specification/issues/51. The Specification will be updated after this is agreed upon. The grammar has been modified as follows:
utf8
primitive.byte
primitive.saturated bool
, which was shorthand forbool
, for regularity. From now on, only unqualifiedbool
is allowed. The expected impact is zero since the long form was never seen in the wild. Note thattruncated bool
was never legal.At the moment, the following constraints are enforced; they may be lifted in the future:
utf8
can only be used as an element type of a variable-length array:byte
can only be used as an element type of an array:Both
utf8
andbyte
are concrete instances ofUnsignedIntegerType
. By virtue of this, existing users of PyDSDL (like Nunavut) will interpret bothutf8
andbyte
astruncated uint8
, until explicitly updated to take advantage of the new feature. That is:Property
pydsdl.ArrayType.string_like
is now deprecated and should be replaced with an explicitisinstance(array.element_type, pydsdl.UTF8Type)
.Some internal refactoring has been done to unify the deprecation consistency checking with the aggregation constraints listed above (e.g.,
utf8[<=10]
is valid bututf8[10]
is not).Closes #96 Relates to https://github.com/OpenCyphal/yakut/issues/65