summaryrefslogtreecommitdiff
path: root/CHANGES.rst
diff options
context:
space:
mode:
authorIlya Etingof <etingof@gmail.com>2019-06-23 19:48:31 +0200
committerGitHub <noreply@github.com>2019-06-23 19:48:31 +0200
commit66d329acaaf204eff63ae595fd7d6f56cd530c72 (patch)
tree46187ae1df17aa9eb728abc2c55ef5ce612c6764 /CHANGES.rst
parentb028644dea4244f1cd2513ab0241c8cb9be43324 (diff)
downloadpyasn1-git-66d329acaaf204eff63ae595fd7d6f56cd530c72.tar.gz
SequenceOf/SetOf to remain a schema objects (#162)
* Add `omitEmptyOptionals` encoder option 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`. * Change `SequenceOf`/`SetOf` behaviour - 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. - 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. - Added `.reset()` method to all constructed types to turn value object into a schema object.
Diffstat (limited to 'CHANGES.rst')
-rw-r--r--CHANGES.rst27
1 files changed, 25 insertions, 2 deletions
diff --git a/CHANGES.rst b/CHANGES.rst
index dabdb33..19e7bd9 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -1,8 +1,31 @@
-Revision 0.4.6, released XX-01-2019
+Revision 0.4.6, released XX-06-2019
-----------------------------------
-No changes yet
+- 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`.
+- 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.
+- 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 on `componentType` is given, the behaviour is the
+ same as `SequenceOf`/`SetOf` have. IF `componentType` is given, but
+ neither optional nor defaulted components are present, the created
+ instance remains schema object, If, however, either optional or
+ defaulted component isi present, the created instance immediately
+ becomes a value object.
+- Added `.reset()` method to all constructed types to turn value object
+ into a schema object.
Revision 0.4.5, released 29-12-2018
-----------------------------------