PyASN1 Changelog

What's new in PyASN1 0.1.8 RC 2

Feb 16, 2015
  • ObjectIdentifier codec fixed to work properly with arc 0 and arc 2 values.
  • Explicit limit on ObjectIdentifier arc value size removed.
  • Unicode initializer support added to OctetString type and derivatives.
  • New prettyPrintType() abstract method implemented to base pyasn1 types to facilitate encoding errors analisys.
  • The __str__() method implemented to Tag, TagSet and TagMap classes to ease encoding errors troubleshooting. easing encoding errors
  • Fix to SEQUENCE and SET types to give them their private componentTypes collection (which is a NamedTypes object) so that they won't collide in a MT execution environment.
  • Missing T61String,ISO646String character types and ObjectDescriptor useful type added.
  • Distribute is gone, switched to setuptools completely.
  • Missing NamedValues.__repr__() added.
  • The base.NoValue() class, that indicates uninitialized ASN.1 object, made public.
  • The base.NoValue() class instances now support __repr__() what makes possible to perform repr() on uninitialized pyasn1 types objects.
  • When comparing ASN.1 types, by-tag and/or by-constraints matching can now be performed with the isSuperTypeOf()/isSameTypeWith() optional flags.
  • Constructed types now verify their consistency by invoking isSameTypeWith(matchTags=True, matchConstraints=False) and isSuperTypeOf(matchTags=False, matchConstraints=True) for each of their components rather than isSuperTypeOf() as it used to be. Constriants check could be enforced to isSameTypeWith() with the strictConstraints=True constructed classes attribute.
  • Constructed types can now be initialized with new .setComponents() method which accepts both var-args and keyword-args. Default repr() modified to reflect this change.
  • NamedTypes() and NamedValues() made comparable.
  • Test coverage extended to cover pyasn1 types __repr__() function.
  • The abs(Integer()) & abs(Real()) operation now returns respective pyasn1 type, not a Python type.
  • More Python magic methods implementations added to Integer & Real classes (e.g. __pos__, __neg__, __round__, __floor__, __ceil__, __trunc__)
  • The Integer.__invert__ Python magic method implemented.
  • The OctetString.__int__() and .__float__() magic methods implemented.
  • Handle the case of null writer at Debug printer.
  • BitString encoder/decoder performance improved.
  • Built-in debugging is now based on Python logging module.
  • Fix to NamedType.__repr__() to work properly.
  • Fixes to __repr__() implementation of many built-in ASN.1 types to take into account all of their initializers such as tagSet, subtypeSpec etc.
  • String typed float initializer to REAL type now supported.
  • Float typed mantissa initializer to REAL type for base 2 added.
  • Encoding bases 8 and 16 support for REAL type binary encoder added.
  • Fix to REAL type binary decoder to handle different bases and scale factor.
  • Fix to TagSet.repr() to include [obsolete] baseTag information.

New in PyASN1 0.1.8 RC 0 (Jun 3, 2013)

  • Fix to SEQUENCE and SET types to give them their private componentTypes collection (which is a NamedTypes object) so that they won't collide in a MT execution environment.
  • Fix to NamedType.__repr__() to work properly.

New in PyASN1 0.1.7 (Jun 3, 2013)

  • License updated to vanilla BSD 2-Clause to ease package use

New in PyASN1 0.1.7 RC 2 (Feb 16, 2013)

  • Test suite made discoverable by unittest/unittest2 discovery feature.
  • Fix to decoder working on indefinite length substrate -- end-of-octets marker is now detected by both tag and value. Otherwise zero values may interfere with end-of-octets marker.
  • Fix to decoder to fail in cases where tagFormat indicates inappropriate format for the type (e.g. BOOLEAN is always PRIMITIVE, SET is always CONSTRUCTED and OCTET STRING is either of the two)
  • Fix to REAL type encoder to force primitive encoding form encoding.
  • Fix to CHOICE decoder to handle explicitly tagged, indefinite length mode encoding

New in PyASN1 0.1.6 (Jan 30, 2013)

  • The compact (valueless) way of encoding zero INTEGERs introduced in 0.1.5 seems to fail miserably as the world is filled with broken BER decoders. So we had to back off the *encoder* for a while. There's still the IntegerEncoder.supportCompactZero flag which enables compact encoding form whenever it evaluates to True.
  • Report package version on debugging code initialization.

New in PyASN1 0.1.5 (Dec 20, 2012)

  • Documentation updated and split into chapters to better match web-site contents.
  • Make prettyPrint() working for non-initialized pyasn1 data objects. It used to throw an exception.
  • Fix to encoder to produce empty-payload INTEGER values for zeros
  • Fix to decoder to support empty-payload INTEGER and REAL values
  • Fix to unit test suites imports to be able to run each from their current directory

New in PyASN1 0.1.4 RC 4 (May 16, 2012)

  • Built-in codec debugging facility added
  • Added some more checks to ObjectIdentifier BER encoder catching possible 2^8 overflow condition by two leading sub-OIDs
  • Fix in Boolean truth testting built-in methods
  • Fix to substrate underrun error handling at ObjectIdentifier BER decoder
  • Fix to BER Boolean decoder that allows other pre-computed values besides 0 and 1

New in PyASN1 0.1.3 RC 1 (Apr 21, 2012)

  • Fix to OctetString.prettyOut() method that looses leading zero when building hex string.

New in PyASN1 0.1.3 RC 0 (Apr 13, 2012)

  • Include class name into asn1 value constraint violation exception.

New in PyASN1 0.1.2 (Apr 13, 2012)

  • Fix to __long__() to actually return longs on py2k
  • Fix to OctetString.__str__() workings of a non-initialized object.
  • Fix to quote initializer of OctetString.__repr__()
  • Minor fix towards ObjectIdentifier.prettyIn() reliability
  • ObjectIdentifier.__str__() is aliased to prettyPrint()
  • Exlicit repr() calls replaced with '%r'

New in PyASN1 0.1.1 (Apr 13, 2012)

  • Hex/bin string initializer to OctetString object reworked
  • in a backward-incompatible manner)
  • Fixed float() infinity compatibility issue (affects 2.5 and earlier)
  • Fixed a bug/typo at Boolean CER encoder
  • Major overhawl for Python 2.4 -- 3.2 compatibility
  • get rid of old-style types
  • drop string module usage
  • switch to rich comparation
  • drop explicit long integer type use
  • map()/filter() replaced with list comprehension
  • apply() replaced with */**args
  • switched to use 'key' sort() callback function
  • support both __nonzero__() and __bool__() methods
  • modified not to use py3k-incompatible exception syntax
  • getslice() operator fully replaced with getitem()
  • dictionary operations made 2K/3K compatible
  • base type for encoding substrate and OctetString-based types
  • is now 'bytes' when running py3k and 'str' otherwise
  • OctetString and derivatives now unicode compliant
  • OctetString now supports two python-neutral getters: asOcts() & asInts()
  • print OctetString content in hex whenever it is not printable otherwise
  • in test suite, implicit relative import replaced with the absolute one
  • in test suite, string constants replaced with numerics

New in PyASN1 0.0.13 (Apr 13, 2012)

  • Fix to base10 normalization function that loops on univ.Real(0)

New in PyASN1 0.0.13b (Apr 13, 2012)

  • ASN.1 Real type is now supported properly.
  • Objects of Constructed types now support __setitem__()
  • Set/Sequence objects can now be addressed by their field names (string index)
  • and position (integer index).
  • Typo fix to ber.SetDecoder code that prevented guided decoding operation.
  • Fix to explicitly tagged items decoding support.
  • Fix to OctetString.prettyPrint() to better handle non-printable content.
  • Fix to repr() workings of Choice objects.

New in PyASN1 0.0.13a (Apr 13, 2012)

  • Major codec re-design.
  • Documentation significantly improved.
  • ASN.1 Any type is now supported.
  • All example ASN.1 modules moved to separate pyasn1-modules package.
  • Fix to initial sub-OID overflow condition detection an encoder.
  • BitString initialization value verification improved.
  • The Set/Sequence.getNameByPosition() method implemented.
  • Fix to proper behaviour of PermittedAlphabetConstraint object.
  • Fix to improper Boolean substrate handling at CER/DER decoders.
  • Changes towards performance improvement:
  • all dict.has_key() & dict.get() invocations replaced with modern syntax
  • this breaks compatibility with Python 2.1 and older).
  • tag and tagset caches introduced to decoder
  • decoder code improved to prevent unnecessary pyasn1 objects creation
  • allow disabling components verification when setting components to
  • structured types, this is used by decoder whilst running in guided mode.
  • BER decoder for integer values now looks up a small set of pre-computed
  • substrate values to save on decoding.
  • a few pre-computed values configured to ObjectIdentifier BER encoder.
  • ChoiceDecoder split-off SequenceOf one to save on unnecessary checks.
  • replace slow hasattr()/getattr() calls with isinstance() introspection.
  • track the number of initialized components of Constructed types to save
  • on default/optional components initialization.
  • added a shortcut ObjectIdentifier.asTuple() to be used instead of
  • getitem__() in hotspots.
  • use Tag.asTuple() and pure integers at tag encoder.
  • introduce and use in decoder the baseTagSet attribute of the built-in
  • ASN.1 types.

New in PyASN1 0.0.12a (Apr 13, 2012)

  • The individual tag/length/value processing methods of encoder.AbstractItemEncoder renamed (leading underscore stripped) to promote overloading in cases where partial substrate processing
  • is required.
  • The ocsp.py, ldap.py example scripts added.
  • Fix to univ.ObjectIdentifier input value handler to disallow negative sub-IDs.

New in PyASN1 0.0.11a (Apr 13, 2012)

  • Decoder can now treat values of unknown types as opaque OctetString.
  • Fix to Set/SetOf type decoder to handle uninitialized scalar SetOf components correctly.

New in PyASN1 0.0.10a (Apr 13, 2012)

  • API versioning mechanics retired (pyasn1.v1 -> pyasn1) what makes it possible to zip-import pyasn1 sources (used by egg and py2exe).

New in PyASN1 0.0.9a (Apr 13, 2012)

  • Allow any non-zero values in Boolean type BER decoder, as it's in accordance with the standard.