Upgrading pyasn1 0.3 to 0.4
Breaking0.3.7 → 0.4.8Breaking3Deprecated1New12Changed7Fixed13Other5
BreakingUpgrade verdict
3 breaking changes.
In plain terms
- New sequences and sets no longer start out as empty values; they stay as type definitions until you add something or clear them.
- Code that passed None to indicate a schema object must now use the isValue singleton instead.
- Creating a Null without arguments now gives a schema object; pass '' to get a value object.
- The old way of specifying size limits is deprecated; use constraint objects instead.
Must act 4 items need code or config changes
What you must change
Breaking3
Removes default initializer from
SequenceOf/SetOf, so instances stay schema objects until a component is added or .clear() is called.SequenceOfSetOfSequenceSetcomponentTypeclear()Makes the
isValue singleton the only way to indicate ASN.1 schema; removes legacy None initializer support.isValueChanges
Null initialization: Null() now produces a schema object and Null('') a value object, since the default '' is no longer set.NullDeprecations to plan for
Deprecated1
Deprecates subtypeSpec attributes and keyword argument, recommending ValueSizeConstraint and other constraints be passed to subtypeSpec.
subtypeSpecValueSizeConstraint