Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SequenceOf/SetOf to remain a schema objects #162

Merged
merged 3 commits into from
Jun 23, 2019

Conversation

etingof
Copy link
Owner

@etingof etingof commented Jun 23, 2019

- 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.

etingof added 3 commits June 23, 2019 10:50
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.

- Added `.reset()` method to all constructed types to turn value object
  into a schema object.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant