From 41ce2e5cfeef488f847c3f58ff3d9d0fceb9ded7 Mon Sep 17 00:00:00 2001 From: Ilya Etingof Date: Sun, 25 Aug 2019 15:17:38 +0200 Subject: 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). --- CHANGES.rst | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'CHANGES.rst') diff --git a/CHANGES.rst b/CHANGES.rst index 0dcb2f2..f9c00bb 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -7,6 +7,15 @@ Revision 0.4.7, released XX-09-2019 purpose e.g. ensuring all required fields are in a good shape. By default this check invokes subtype constraints verification and is run by codecs on value de/serialisation. +- Deprecate `subtypeSpec` attributes and keyword argument. It is now + recommended to pass `ValueSizeConstraint`, as well as all other constraints, + to `subtypeSpec`. +- Fixed 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). Revision 0.4.6, released 31-07-2019 ----------------------------------- -- cgit v1.2.1