Releases: etingof/pyasn1
Release 0.4.8
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.
Release 0.4.6
This release brings support for one overlooked ASN.1 feature:
- Added previously missing
SET OF ANY
construct 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
/SetOf
objects 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
/SetOf
objects. - Removed default initializer from
SequenceOf
/SetOf
types to ensure
consistent behaviour with the rest of ASN.1 types. Before this change,
SequenceOf
/SetOf
instances immediately become value objects behaving
like an empty list. With this change,SequenceOf
/SetOf
objects
remain schema objects unless a component is added or.clear()
is
called.
This change can potentially cause incompatibilities with existing
pyasn1 objects which assumeSequenceOf
/SetOf
instances are value
objects right upon instantiation.
The behaviour ofSequence
/Set
types depends on thecomponentType
initializer: if nocomponentType
is given, the behavior is the
same asSequenceOf
/SetOf
have. IfcomponentType
is 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
omitEmptyOptionals
option which is respected bySequence
andSet
encoders. WhenomitEmptyOptionals
is set toTrue
, empty
initialized optional components are not encoded. Default isFalse
. - Added
PyAsn1UnicodeDecodeError
/PyAsn1UnicodeDecodeError
exceptions
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
GeneralizedTime
codec.
And, of course, bug fixes \o/
- Fixed 3-digit fractional seconds value CER/DER encoding of
GeneralizedTime
. - Fixed
AnyDecoder
to accept possibleTagMap
asasn1Spec
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
.prettyPrint
ofSequence
andSet
occurring 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.