Make SIZE OF constraint operational (#46)

Changes `ValueSizeConstraint` erroneously applied to `SequenceOf`
and `SetOf` objects via `subtypeConstraint` attribute to be applied
via `sizeSpec` attribute.

Although `sizeSpec` takes the same constraint objects as
`subtypeConstraint`, the former is only verified on de/serialization
i.e. when the [constructed] object at hand is fully populated, while
the latter is applied to [scalar] types at the moment of instantiation.

This change also bumps pyasn1 requirement to 0.4.6.
23 files changed
tree: 5385178e4699ee2fe1b1c4ce446564aefde5a1f2
  1. pyasn1_modules/
  2. tests/
  3. tools/
  4. .gitignore
  5. .travis.yml
  6. CHANGES.txt
  7. LICENSE.txt
  8. MANIFEST.in
  9. README.md
  10. requirements.txt
  11. setup.cfg
  12. setup.py
README.md

ASN.1 modules for Python

PyPI Python Versions Build status Coverage Status GitHub license

This is a small but growing collection of ASN.1 data structures expressed in Python terms using pyasn1 data model.

If ASN.1 module you need is not present in this collection, try using Asn1ate tool that compiles ASN.1 documents into pyasn1 code.

Feedback

If something does not work as expected, try browsing pyasn1 mailing list archives or post your question to Stack Overflow. If you want to contribute ASN.1 modules you have converted into pyasn1, please send me a pull request.

Copyright (c) 2005-2019, Ilya Etingof. All rights reserved.