Skip to content

Releases: etingof/pyasn1

Release 0.4.8

16 Nov 17:14
Compare
Choose a tag to compare

This is a minor feature release:

  • Added ability to combine SingleValueConstraint and PermittedAlphabetConstraint objects into one for proper modeling FROM ... EXCEPT ... ASN.1 clause.

Release 0.4.7

01 Sep 16:08
Compare
Choose a tag to compare

The major feature of this release is SET ... WITH COMPONENTS constraint support.

  • Added WithComponentsConstraint along with related
    ComponentPresentConstraint and ComponentAbsentConstraint classes
    to be used with Sequence/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 pass ValueSizeConstraint, as well as all other constraints,
    to subtypeSpec.
  • Added isInconsistent property to all constructed types. This property
    conceptually replaces verifySizeSpec 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 if Asn1Type-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

31 Jul 19:50
Compare
Choose a tag to compare

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 assume SequenceOf/SetOf instances are value
    objects right upon instantiation.
    The behaviour of Sequence/Set types depends on the componentType
    initializer: if no componentType is given, the behavior is the
    same as SequenceOf/SetOf have. If componentType 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 by Sequence
    and Set encoders. When omitEmptyOptionals is set to True, empty
    initialized optional components are not encoded. Default is False.
  • 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 possible TagMap as asn1Spec
    to make dumping raw value operational

Complete list of changes can be found in CHANGELOG.

Release 0.4.5

29 Dec 20:47
Compare
Choose a tag to compare

This is a maintenance release mostly focusing on providing better debugging information.

Changes are noted in the CHANGELOG.

Release 0.4.4

26 Jul 07:29
Compare
Choose a tag to compare

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 of Sequence and Set occurring at OPTIONAL components

Changes are noted in the CHANGELOG.

Release 0.4.3

23 May 20:37
Compare
Choose a tag to compare

This is a minor maintenance release.

Changes are noted in the CHANGELOG.

Release 0.4.2

23 Nov 18:51
df3a2b7
Compare
Choose a tag to compare

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

23 Nov 10:51
Compare
Choose a tag to compare

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

04 Oct 20:09
Compare
Choose a tag to compare

This is a minor bugfix release.

All changes are noted in the CHANGELOG.

Release 0.3.6

20 Sep 20:35
Compare
Choose a tag to compare

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.