diff options
author | Ilya Etingof <etingof@gmail.com> | 2019-09-01 17:58:56 +0200 |
---|---|---|
committer | Ilya Etingof <etingof@gmail.com> | 2019-09-01 17:58:56 +0200 |
commit | 771aa24c2b52e0ec410f9a94c3a114a6078a3641 (patch) | |
tree | 8e6e6a207046117cb66aea3bf0fff6a34e02a2dd | |
parent | 3cae125ac526f614021274337b5992a418191ab8 (diff) | |
download | pyasn1-git-771aa24c2b52e0ec410f9a94c3a114a6078a3641.tar.gz |
Release 0.4.7v0.4.7
-rw-r--r-- | CHANGES.rst | 2 | ||||
-rw-r--r-- | pyasn1/type/constraint.py | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/CHANGES.rst b/CHANGES.rst index 88f5c63..139376d 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,5 +1,5 @@ -Revision 0.4.7, released XX-09-2019 +Revision 0.4.7, released 01-09-2019 ----------------------------------- - Added `isInconsistent` property to all constructed types. This property diff --git a/pyasn1/type/constraint.py b/pyasn1/type/constraint.py index 0049f97..b66627d 100644 --- a/pyasn1/type/constraint.py +++ b/pyasn1/type/constraint.py @@ -454,7 +454,7 @@ class WithComponentsConstraint(AbstractConstraint): OptionalNamedType('id', Integer()), OptionalNamedType('name', OctetString()) ) - withComponents = ConstraintsIntersection( + withComponents = ConstraintsUnion( WithComponentsConstraint( ('id', ComponentPresentConstraint()), ('name', ComponentAbsentConstraint()) @@ -471,9 +471,11 @@ class WithComponentsConstraint(AbstractConstraint): item['id'] = 1 # This will succeed + item.reset() item['name'] = 'John' - # This will fail on encoding + # This will fail (on encoding) + item.reset() descr['id'] = 1 descr['name'] = 'John' """ |