Release 0.4.7
The major feature of this release is SET ... WITH COMPONENTS
constraint support.
- Added
WithComponentsConstraint
along with related
ComponentPresentConstraint
andComponentAbsentConstraint
classes
to be used withSequence
/Set
types representing
SET ... WITH COMPONENTS ...
like ASN.1 constructs.
The other important change is that sizeSpec
attribute of ASN.1 objects is now deprecated
in favor of uniform subtypeSpec
, which is now used for all constraints.
- Deprecate
subtypeSpec
attributes and keyword argument. It is now
recommended to passValueSizeConstraint
, as well as all other constraints,
tosubtypeSpec
. - Added
isInconsistent
property to all constructed types. This property
conceptually replacesverifySizeSpec
method to serve a more general
purpose e.g. ensuring all required fields are in a good shape. By default
this check invokes subtype constraints verification and is run by codecs
on value de/serialisation.
In the bug fixes department we have just one fix:
- Fixed a design bug in a way of how the items assigned to constructed
types are verified. Now ifAsn1Type
-based object is assigned, its
compatibility is verified based on having all tags and constraint
objects as the type in field definition. When a bare Python value is
assigned, then field type object is cloned and initialized with the
bare value (constraints verificaton would run at this moment).
Complete list of changes can be found in CHANGELOG.