diff options
| author | Ilya Etingof <etingof@gmail.com> | 2019-08-25 15:17:38 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-08-25 15:17:38 +0200 |
| commit | 41ce2e5cfeef488f847c3f58ff3d9d0fceb9ded7 (patch) | |
| tree | 742135c2f6a578a45bac4850fb72f915f136e464 /docs/source | |
| parent | 66afc8921e4f5d3a41e407ab6d95ce7e4ec5383a (diff) | |
| download | pyasn1-git-41ce2e5cfeef488f847c3f58ff3d9d0fceb9ded7.tar.gz | |
Deprecate `sizeSpec` in favor of `subtypeSpec` (#172)
This commit deprecates `subtypeSpec` attributes and keyword argument.
It is now recommended to pass `ValueSizeConstraint`, as well as all
other constraints, to `subtypeSpec`.
By way of the change mentioned above, this commit fixes a design bug
in a way of how the items assigned to constructed types are verified.
Now if `Asn1Type`-based object is assigned, its compatibility is
verified based on having all tags and constraint objects as the type
in field definition. When a bare Python value is assigned, then field
type object is cloned and initialized with the bare value (constraints
verificaton would run at this moment).
Diffstat (limited to 'docs/source')
| -rw-r--r-- | docs/source/pyasn1/type/base/constructedasn1type.rst | 2 | ||||
| -rw-r--r-- | docs/source/pyasn1/type/univ/choice.rst | 4 | ||||
| -rw-r--r-- | docs/source/pyasn1/type/univ/sequence.rst | 4 | ||||
| -rw-r--r-- | docs/source/pyasn1/type/univ/sequenceof.rst | 4 | ||||
| -rw-r--r-- | docs/source/pyasn1/type/univ/set.rst | 4 | ||||
| -rw-r--r-- | docs/source/pyasn1/type/univ/setof.rst | 4 |
6 files changed, 11 insertions, 11 deletions
diff --git a/docs/source/pyasn1/type/base/constructedasn1type.rst b/docs/source/pyasn1/type/base/constructedasn1type.rst index 169552f..cf7f665 100644 --- a/docs/source/pyasn1/type/base/constructedasn1type.rst +++ b/docs/source/pyasn1/type/base/constructedasn1type.rst @@ -6,5 +6,5 @@ |ASN.1| type ------------ -.. autoclass:: pyasn1.type.base.ConstructedAsn1Type(tagSet=TagSet(), subtypeSpec=ConstraintsIntersection(), sizeSpec=ConstraintsIntersection(), componentType=None) +.. autoclass:: pyasn1.type.base.ConstructedAsn1Type(tagSet=TagSet(), subtypeSpec=ConstraintsIntersection(), componentType=None) :members: isSameTypeWith, isSuperTypeOf, tagSet, effectiveTagSet, tagMap, subtypeSpec, isInconsistent diff --git a/docs/source/pyasn1/type/univ/choice.rst b/docs/source/pyasn1/type/univ/choice.rst index 9e2b4dc..323932b 100644 --- a/docs/source/pyasn1/type/univ/choice.rst +++ b/docs/source/pyasn1/type/univ/choice.rst @@ -6,8 +6,8 @@ |ASN.1| type ------------ -.. autoclass:: pyasn1.type.univ.Choice(componentType=None, tagSet=tagSet(), subtypeSpec=ConstraintsIntersection(), sizeSpec=ConstraintsIntersection()) - :members: isValue, isSameTypeWith, isSuperTypeOf, tagSet, effectiveTagSet, tagMap, componentType, subtypeSpec, sizeSpec, +.. autoclass:: pyasn1.type.univ.Choice(componentType=None, tagSet=tagSet(), subtypeSpec=ConstraintsIntersection()) + :members: isValue, isSameTypeWith, isSuperTypeOf, tagSet, effectiveTagSet, tagMap, componentType, subtypeSpec, getComponentByPosition, setComponentByPosition, getComponentByName, setComponentByName, setDefaultComponents, getComponentByType, setComponentByType, getName, getComponent, isInconsistent diff --git a/docs/source/pyasn1/type/univ/sequence.rst b/docs/source/pyasn1/type/univ/sequence.rst index 94804c7..163a3a0 100644 --- a/docs/source/pyasn1/type/univ/sequence.rst +++ b/docs/source/pyasn1/type/univ/sequence.rst @@ -6,8 +6,8 @@ |ASN.1| type ------------ -.. autoclass:: pyasn1.type.univ.Sequence(componentType=NamedTypes(), tagSet=tagSet(), subtypeSpec=ConstraintsIntersection(), sizeSpec=ConstraintsIntersection()) - :members: isValue, isSameTypeWith, isSuperTypeOf, tagSet, effectiveTagSet, tagMap, componentType, subtypeSpec, sizeSpec, getComponentByPosition, +.. autoclass:: pyasn1.type.univ.Sequence(componentType=NamedTypes(), tagSet=tagSet(), subtypeSpec=ConstraintsIntersection()) + :members: isValue, isSameTypeWith, isSuperTypeOf, tagSet, effectiveTagSet, tagMap, componentType, subtypeSpec, getComponentByPosition, setComponentByPosition, getComponentByName, setComponentByName, setDefaultComponents, clear, reset, isInconsistent diff --git a/docs/source/pyasn1/type/univ/sequenceof.rst b/docs/source/pyasn1/type/univ/sequenceof.rst index be5442e..dd4f0c5 100644 --- a/docs/source/pyasn1/type/univ/sequenceof.rst +++ b/docs/source/pyasn1/type/univ/sequenceof.rst @@ -6,8 +6,8 @@ |ASN.1| type ------------ -.. autoclass:: pyasn1.type.univ.SequenceOf(componentType=NoValue(), tagSet=TagSet(), subtypeSpec=ConstraintsIntersection(), sizeSpec=ConstraintsIntersection()) - :members: isValue, isSameTypeWith, isSuperTypeOf, tagSet, effectiveTagSet, tagMap, componentType, subtypeSpec, sizeSpec, +.. autoclass:: pyasn1.type.univ.SequenceOf(componentType=NoValue(), tagSet=TagSet(), subtypeSpec=ConstraintsIntersection()) + :members: isValue, isSameTypeWith, isSuperTypeOf, tagSet, effectiveTagSet, tagMap, componentType, subtypeSpec, getComponentByPosition, setComponentByPosition, clear, reset, isInconsistent .. note:: diff --git a/docs/source/pyasn1/type/univ/set.rst b/docs/source/pyasn1/type/univ/set.rst index aad8ee0..157fed0 100644 --- a/docs/source/pyasn1/type/univ/set.rst +++ b/docs/source/pyasn1/type/univ/set.rst @@ -6,8 +6,8 @@ |ASN.1| type ------------ -.. autoclass:: pyasn1.type.univ.Set(componentType=NamedTypes(), tagSet=TagSet(), subtypeSpec=ConstraintsIntersection(), sizeSpec=ConstraintsIntersection()) - :members: isValue, isSameTypeWith, isSuperTypeOf, tagSet, effectiveTagSet, tagMap, componentType, subtypeSpec, sizeSpec, +.. autoclass:: pyasn1.type.univ.Set(componentType=NamedTypes(), tagSet=TagSet(), subtypeSpec=ConstraintsIntersection()) + :members: isValue, isSameTypeWith, isSuperTypeOf, tagSet, effectiveTagSet, tagMap, componentType, subtypeSpec, getComponentByPosition, setComponentByPosition, getComponentByName, setComponentByName, setDefaultComponents, getComponentByType, setComponentByType, clear, reset, isInconsistent diff --git a/docs/source/pyasn1/type/univ/setof.rst b/docs/source/pyasn1/type/univ/setof.rst index ce519a9..581c20f 100644 --- a/docs/source/pyasn1/type/univ/setof.rst +++ b/docs/source/pyasn1/type/univ/setof.rst @@ -6,8 +6,8 @@ |ASN.1| type ------------ -.. autoclass:: pyasn1.type.univ.SetOf(componentType=NoValue(), tagSet=TagSet(), subtypeSpec=ConstraintsIntersection(), sizeSpec=ConstraintsIntersection()) - :members: isValue, isSameTypeWith, isSuperTypeOf, tagSet, effectiveTagSet, tagMap, componentType, subtypeSpec, sizeSpec, +.. autoclass:: pyasn1.type.univ.SetOf(componentType=NoValue(), tagSet=TagSet(), subtypeSpec=ConstraintsIntersection()) + :members: isValue, isSameTypeWith, isSuperTypeOf, tagSet, effectiveTagSet, tagMap, componentType, subtypeSpec, Â getComponentByPosition, setComponentByPosition, clear, reset, isInconsistent .. note:: |
