[plum] Release Notes¶
Versions increment per semver (except for alpha/beta versions).
Beta (0.X.Y) Versions (X increments on backwards incompatible changes)¶
This beta release contains many breaking changes! This release note entry attempts to summarize most breaking changes. Please read the extensively rewritten documentation to assess in detail what has changed.
Python 3.6 support dropped.
Changed most plum constructs (e.g. Int, Float, etc.) from being a data store type (with transform properties) into a simple transform type (e.g. IntX, FloatX, etc.). Instead of subclassing to obtain a custom transform, now instantiate the transform.
ByteArray data store eliminated and replaced with BytesX transform.
Added ItemsX transform for specifying dict, list, tuple formats.
- Structure & BitFields changes
Bitfield members cls argument name changed to typ.
Member cls argument name changed to fmt.
Type annotations no longer used for the member format transform (previously if cls was unspecified, the annotation was used).
Pack operations no longer accept dictionaries.
Reduced number of member definition classes (same abilities exist, but features were added to standard Member to accomodate them).
pack() now only usable as a class method. ipack() introduced for usage on instances.
Pack operations now return bytes instead of bytearray.
Unpack operations no longer support File I/O as input buffer.
pack() and unpack() functions/methods offer more flexibility for specifying data transform format.
unpack_from() eliminated (use Buffer construct instead).
Support following boost performance improvements:
Improve performance of
unpack()method calls for structure and integer based types.
Improve performance of calls to
__unpack__for structure and integer and based types.
Add support for passing a factory function as the
clsargument for following variable member definitions:
Improve structure representation of enumeration members.
plum.itemsmodule for collections of typed items for data packing applications where the item structure is not predefined.
plum.structure.Structurebehaviors as follows:
Remove support for accepting typed items (use
Block subclasses from redefining members when inheriting from a class with members already defined.
__init__method only when not overridden (previously it generated
__init__only if an override was not present in the new structure class, now it also checks the base classes).
Facilitate subclassing structure base class without defining members as well as subclassing a structure that has defined members.
Eliminate restrictions on mutating structures (e.g.
Add support to
ByteArrayto restrict instances to a specific size during unpacking (add
getbytes()function (backward incompatible change).
Eliminate need to set
__unpack__methods (it is now the responsibility of those calling
Iteration/index/accepted iterables now ordered from least significant byte to most. (Previously it followed byte order of the class.)
sourcemetaclass argument when subclassing
Flagenumeration types. Argument facilitates inheriting enumeration members.