[plum] Release Notes¶
Versions increment per semver (except for alpha/beta versions).
Beta (0.X.Y) Versions (X increments on backwards incompatible changes)¶
0.4.0 2020-Aug-28
Support following boost performance improvements:
- Improve performance of
pack()
andunpack()
method calls for structure and integer based types. - Improve performance of calls to
__pack__
and__unpack__
for structure and integer and based types.
- Improve performance of
0.3.1 2020-Apr-13
Add support for passing a factory function as the
cls
argument for following variable member definitions:VariableDimsMember
VariableSizeMember
Improve structure representation of enumeration members.
0.3.0 2020-Mar-31
- Add
plum.items
module for collections of typed items for data packing applications where the item structure is not predefined. - Change
plum.structure.Structure
behaviors as follows: - Remove support for accepting typed items (use
plum.items
instead). - Block subclasses from redefining members when inheriting from a class with members already defined.
- Generate
__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.
append()
,extend()
, etc.)
- Remove support for accepting typed items (use
- Change
- Add support to
ByteArray
to restrict instances to a specific size during unpacking (addnbytes
parameter to__unpack__
). - Simplifications
- Remove
cls
argument ingetbytes()
function (backward incompatible change). - Eliminate need to set
dump.cls
in__pack__
and__unpack__
methods (it is now the responsibility of those callingadd_record()
dump method).
- Remove
- Add
0.2.0 2020-Mar-11
- Fix
IpV4Address
iteration order. - Iteration/index/accepted iterables now ordered from least significant byte to most. (Previously it followed byte order of the class.)
- Fix
- Support
source
metaclass argument when subclassingEnum
andFlag
enumeration types. Argument facilitates inheriting enumeration members.
Alpha (0.1.0aX) Versions (only serial number X increments)¶
- 0.1.0a24 2020-Mar-08
- Change pack/unpack protocol.
__pack__
and__unpack__
now pass a reference to a parent (previously they passed references to a list of parents).__pack__
now passesparent
beforevalue
(to make it more uniform with__unpack__
.
- 0.1.0a23 2020-Mar-08
- Add IPV4 address support (not class name changed).
- 0.1.0a22 2020-Mar-05
- Add preliminary IPV4 address support (docs and test not yet complete).
- 0.1.0a21 2020-Feb-26
- Always install
__unpack__
special structure method in structure subclass with members (to facilitate subclassing where base class has__unpack__
that may otherwise cause recursion).
- Always install
- 0.1.0a20 2020-Feb-24
- Add
BitFieldMember
class to facilitate embedding bit fields directly within a structure.
- Add
- 0.1.0a19 2020-Feb-18
- Streamline array pack, eliminate unnecessary instantiation of array class, use iterable values as is.
- 0.1.0a18 2020-Feb-18
- Support
offset
in structureSizeMember
member definition. - Avoid calling item initializer when packing arrays.
- Support
- 0.1.0a17 2020-Feb-17
- Support usage of a class factory function for structure member
definition
cls
. - Support usage of a default factory function for structure member
definition
default
. - Remove support of ‘’decipher`` argument in structure
TypeMember
member definition class (instead use class factory function ascls
). - Remove
Varies
from plum.structure namespace (should no longer need with class factory mechanism).
- Support usage of a class factory function for structure member
definition
- 0.1.0a16 2020-Feb-14
- The structure
TypeMember
member definition now accepts adecipher
function to be used to determine the type member value from the variably typed member value. If the type of the variably typed member value provided during instantiation, packing, or attribute set is not one of the types in themapping
, thedecipher
function gets called. - Add
plum.test
test utilties: - Add
BasicConformance
(base test class to validate basic plum type behaviors). - Add
wrap_message()
(for line wrapping exception messages)
- Add
- Add
- The structure
- 0.1.0a15 2020-Feb-13
Expose
plum.structure.Varies
class as public which is useful as a theMember
classcls
argument as a descriptive placeholder.Structure member protocol improved to perform “touchups” of associated member when variable member is assigned via an attribute set. Specifically:
DimsMember
values update whenVariableDimsMember
setSizeMember
values update whenVariableSizeMember
setTypeMember
values update whenVariableTypeMember
set
- 0.1.0a14 2020-Feb-10
- Allow
BitFields
subclasses to be further subclassed. - Eliminate
bitfield
function and replace with direct use ofBitField
. - Accept
cls
argument inBitField
to facilitate type annotation being different than bit field type.
- Allow
- 0.1.0a13 2020-Feb-9
- Allow structure subclasses to be further subclassed.
- Require use of
Member()
for all structure member definitions. Previously type annotations were used exclusively to define members. This change facilitates allowing other class attributes to have type annotations and facilitates structure members having a different type annotation than the plum type. - Change variable structure member mechanisms:
type_of()
,type_via()
now areTypeMember
andVariableTypeMember
dims_of()
,dims_via()
now areDimsMember
andVariableDimsMember
size_of()
,size_via()
now areSizeMember
andSizeTypeMember
- Eliminate
member()
function. - Eliminate all “freeform” pack functions/methods.
- 0.1.0a12 2020-Feb-04
- Fix memory leaks in plum-boost.
- Fix bit field representations when embedded within a structure or another bit field (previously, they lacked the class name and just showed fields).
- Allow __pack__ method to be overridden in structure definitions (previously metaclass constructed one any that were supplied in class definition).
- Swap parents and dump positional arguments in __unpack__ method to improve look of code that overrides this method.
- 0.1.0a11 2020-Jan-17
- Improve exceptions by giving truer message for certain corner cases of invalid pack() usages.
- Add default support to structure type_of utility.
- Add support for types that require multiple arguments in the structure type_of utility mapping.
- 0.1.0a10 2020-Jan-06
- remove “limit” from __unpack__ API (both argument and return value)
- structure protocol now supports a lineage of parents
- support auto-positioning bit fields
- 0.1.0a9 2019-Dec-23
- change pack functions to mirror unpack with accepting format
- provide “freeform” alternative pack functions (previous pack function API)
- boost working (but doesn’t help formatted packing)
- 0.1.0a8 2019-Dec-12
- Add view support.
- Integer
- Float
- Structure
- Pointer
- Change API of pack_into utility functions.
- Remove support for binary streams.
- Change names of pack/unpack utilities.
pack_and_getdump()
renamed topack_and_dump()
pack_into_and_getdump()
renamed topack_into_and_dump()
unpack_and_getdump()
renamed tounpack_and_dump()
unpack_from_and_getdump()
renamed tounpack_from_and_dump()
- Transition utility functions into methods or properties
calcsize()
->nbytes
propertygetdump()
,dump()
->dump
property
- Add methods for pack and unpack to Plum instances.
- Add support for providing cls/value pairs into pack functions/methods.
- Add support in unpack functions/methods for unpacking tuples/dicts of items.
- Add “strict” selectability support to enumeration types.
- Remove big, little, native modules for integer enumeration and flag types.
0.1.0a7 2019-Apr-30
- Improve variably dimensioned structure member support.
- Change measure_dims() to dims_of().
- Change transfer_dims() to dims_via().
- Remove need for both dims_of() and dims_via() (either is sufficient).
- Improve variably sized structure member support.
- Change measure_size() to size_of().
- Change limit_size() to size_via().
- Remove need for both size_of() and size_via() (either is sufficient).
- Improve variably typed structure member support.
- Add type_of().
- Change switch_type() to type_via().
- Remove Varies from public namespace.
0.1.0a6 2019-Apr-09
- Improve pack protocol and support.
- add pack() utility to plum-c.
- add pack_into() utility (also added to plum-c).
- add pack_into_and_dump() utility.
- add fast pack support to integer plum types.
- Improve dump support.
- Return Dump instance instead of string from *getdump() functions.
- Remove get_table() method from Dump class.
- Support comparision of Dump instance against string.
- Merge Sequence features into Structure.
- Structure now inherits from list and has list features.
- 0.1.0a5 2019-Mar-30
- Improve unpack protocol and support.
- Remove Memory class (use io.BytesIO instead).
- Add unpack_from() and unpack_from_and_dump() functions.
- Change unpack operation to return basic Python built-in types for basic types (e.g. int, float, str, etc.).
- Improve plum-c integer unpack performance (now roughly same as struct).
- Add separate Enum type (previously supported by Int)
- Add Flag type (similar to enum.IntFlag).
- Add GitLab pipelines.
- 0.1.0a4 2019-Mar-13
- Add ByteArray, Float, Nil, Str types.
- Add switch_type( ) to support varying structure member type based on another structure member.
- 0.1.0a3 2019-Mar-07
- Change str() and repr() formats.
- Remove Tuple, SizedArray, SizedObject types.
- Improve tests (use basic conformance for all).
- Add structure tutorials.
- Add structure member protocol.
- Add
measure_dims()
,transfer_dims()
,measure_size()
, andlimit_size()
functions for creating member associations for purposes of sized arrays and sized objects.
- Add
- Add BitFlags type.
- 0.1.0a2 2019-Feb-25
- Stabilize basic types (Array, BitFields, Int, Sequence, Structure)
- Support enumerations.
- Add sized structures (SizedArray, SizedObject).
- Add contribution release form.
- Add docs (quick start and API).
- Add basic, sharable conformance test.
- 0.1.0a1 2019-Feb-05
- Initial “alpha” release.