From 771aa24c2b52e0ec410f9a94c3a114a6078a3641 Mon Sep 17 00:00:00 2001 From: Ilya Etingof Date: Sun, 1 Sep 2019 17:58:56 +0200 Subject: Release 0.4.7 --- CHANGES.rst | 2 +- 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' """ -- cgit v1.2.3