Releases: etingof/pyasn1
Release 0.4.8
Release 0.4.7
The major feature of this release is SET ... WITH COMPONENTS constraint support.
- Added
WithComponentsConstraintalong with related
ComponentPresentConstraintandComponentAbsentConstraintclasses
to be used withSequence/Settypes 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
subtypeSpecattributes and keyword argument. It is now
recommended to passValueSizeConstraint, as well as all other constraints,
tosubtypeSpec. - Added
isInconsistentproperty to all constructed types. This property
conceptually replacesverifySizeSpecmethod 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.
Release 0.4.6
This release brings support for one overlooked ASN.1 feature:
- Added previously missing
SET OF ANYconstruct encoding/decoding support.
As a consequence, SequenceOf/SetOf objects behavior has been made closer to Python list and more consistent with the rest of pyasn1 types (at the expense of potential backward compatibility issues):
- New elements to
SequenceOf/SetOfobjects can now be added at any
position - the requirement for the new elements to reside at the end
of the existing ones (i.e. s[len(s)] = 123) is removed. - List-like slicing support added to
SequenceOf/SetOfobjects. - Removed default initializer from
SequenceOf/SetOftypes to ensure
consistent behaviour with the rest of ASN.1 types. Before this change,
SequenceOf/SetOfinstances immediately become value objects behaving
like an empty list. With this change,SequenceOf/SetOfobjects
remain schema objects unless a component is added or.clear()is
called.
This change can potentially cause incompatibilities with existing
pyasn1 objects which assumeSequenceOf/SetOfinstances are value
objects right upon instantiation.
The behaviour ofSequence/Settypes depends on thecomponentType
initializer: if nocomponentTypeis given, the behavior is the
same asSequenceOf/SetOfhave. IfcomponentTypeis given, but
neither optional nor defaulted components are present, created
instance remains being the schema object. If, however, either optional or
defaulted component is present, created instance immediately
becomes a value object. - Added
.reset()method to all constructed types to turn value object
into a schema object.
Also, a couple of minor usability improvements:
- Added
omitEmptyOptionalsoption which is respected bySequence
andSetencoders. WhenomitEmptyOptionalsis set toTrue, empty
initialized optional components are not encoded. Default isFalse. - Added
PyAsn1UnicodeDecodeError/PyAsn1UnicodeDecodeErrorexceptions
to help the caller treating unicode errors happening internally
to pyasn1 at the upper layers. - Added support for subseconds CER/DER encoding edge cases in
GeneralizedTimecodec.
And, of course, bug fixes \o/
- Fixed 3-digit fractional seconds value CER/DER encoding of
GeneralizedTime. - Fixed
AnyDecoderto accept possibleTagMapasasn1Spec
to make dumping raw value operational
Complete list of changes can be found in CHANGELOG.
Release 0.4.5
This is a maintenance release mostly focusing on providing better debugging information.
Changes are noted in the CHANGELOG.
Release 0.4.4
This is a maintenance release fixing a pair of annoying bugs:
- Fixed native encoder type map to include all ASN.1 types rather than just ambiguous ones
- Fixed crash in
.prettyPrintofSequenceandSetoccurring at OPTIONAL components
Changes are noted in the CHANGELOG.
Release 0.4.3
This is a minor maintenance release.
Changes are noted in the CHANGELOG.
Release 0.4.2
This is an emergency release fixing a regression.
It fixes a single bug in OctetString/BitString encoders which blows up when you BER-encode ASN.1 structure produced by BER decoder.
Changes are noted in the CHANGELOG.
Release 0.4.1
This release introduces ASN.1 open type support and brings a handful of other fixes and improvements. Most important changes are:
- ANY DEFINED BY clause support implemented
- Encoders refactored to take either a value (as ASN.1 object) or a Python value plus ASN.1 schema
- The ASN.1 types'
__repr__()and__str__()implementations reworked for better usability - Improved backward-compatibility with older pyasn1 versions
- Sphinx documentation rearranged, simplified and reworded
All changes are noted in the CHANGELOG.
Release 0.3.7
This is a minor bugfix release.
All changes are noted in the CHANGELOG.
Release 0.3.6
This is mostly a bug fix release. Most important changes are:
- The
__getitem__/__setitem__behavior of Set/Sequence and SetOf/SequenceOf objects aligned with the canonical Mapping and Sequence protocols in part - Fixed crash in ASN.1 encoder when encoding an explicitly tagged component of a Set/Sequence object
More changes noted in the CHANGELOG.