From aadb3ec20aa2d6b0d93d4c3e7f7a6ad70414fcd354abcb9883258d72d0a9b101 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Mon, 6 Dec 2021 17:28:07 +0000 Subject: [PATCH] Accepting request 936060 from home:glaubitz:branches:devel:languages:python - Update to 0.7.0: * allow to use any subscribed type in Typed and Instance. Optional and Union are analyzed to extract the tuple of types to validate. The presence of NoneType in the tuple will make the member optional. For container types (list, dict, set, etc) the content types is not used beyond static type validation. PR #136 #140 Note however that this usage of Optional and Union breaks static analyzer currently, while things deriving from an actual type will work as expected (List[int], list[int], Iterable[int]) * make the factory argument of Typed, Instance and their forwarded version keyword only. PR #123 * add a keyword-only argument to Typed, Instance and their forwarded version: ``optional``. When set to False, this will cause those members to reject None as a valid value. The default value, None, will resolve to True if there is no provided way to build a default value. PR #123 # 131 This is backward incompatible since previously None was always a valid value. * the Instance and Typed variants of the Validate enum have been renamed to OptionalInstance, OptionalTyped and new Instance and Typed variant describing the validation behavior for the member with optional=False have been added. PR #123 * consistently use Instance to wrap types passed to containers. PR #123 For containers, Instance members used for validation are created with optional=False by default. This is backward incompatible since None was always a valid value previously. * add strict argument to FloatRange. PR #124 * allow to specify the type of ReadOnly and Constant. PR #128 The validation is done using the Instance validator. The change for ReadOnly is backward incompatible since the type or tuple of type is the first argument in place of the default value. Specifying the default value by keyword is both forward and backward compatible. * use python stdlib IntEnum instead of the custom one in atom PR #122 * remove the custom atom.IntEnum PR #122 OBS-URL: https://build.opensuse.org/request/show/936060 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-atom?expand=0&rev=11 --- 0.6.0.tar.gz | 3 --- 0.7.0.tar.gz | 3 +++ python-atom.changes | 38 ++++++++++++++++++++++++++++++++++++++ python-atom.spec | 3 ++- 4 files changed, 43 insertions(+), 4 deletions(-) delete mode 100644 0.6.0.tar.gz create mode 100644 0.7.0.tar.gz diff --git a/0.6.0.tar.gz b/0.6.0.tar.gz deleted file mode 100644 index 0bdac5b..0000000 --- a/0.6.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b7ffc51f29d1c6870f09e9d889fb42d34b94c7c55afaf83776c055c2b80aeb4d -size 114817 diff --git a/0.7.0.tar.gz b/0.7.0.tar.gz new file mode 100644 index 0000000..d49cb0a --- /dev/null +++ b/0.7.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:778a421fa64ceac95ec0801799d91ebf73efaf2ceb46e862820fbb9ba57174db +size 134670 diff --git a/python-atom.changes b/python-atom.changes index d4300a4..532f656 100644 --- a/python-atom.changes +++ b/python-atom.changes @@ -1,3 +1,41 @@ +------------------------------------------------------------------- +Mon Dec 6 15:03:50 UTC 2021 - John Paul Adrian Glaubitz + +- Update to 0.7.0: + * allow to use any subscribed type in Typed and Instance. Optional and Union are + analyzed to extract the tuple of types to validate. The presence of NoneType in + the tuple will make the member optional. For container types (list, dict, set, etc) + the content types is not used beyond static type validation. PR #136 #140 + Note however that this usage of Optional and Union breaks static analyzer currently, + while things deriving from an actual type will work as expected (List[int], list[int], + Iterable[int]) + * make the factory argument of Typed, Instance and their forwarded version + keyword only. PR #123 + * add a keyword-only argument to Typed, Instance and their forwarded + version: ``optional``. When set to False, this will cause those members to + reject None as a valid value. The default value, None, will resolve to True + if there is no provided way to build a default value. PR #123 # 131 + This is backward incompatible since previously None was always a valid value. + * the Instance and Typed variants of the Validate enum have been renamed to + OptionalInstance, OptionalTyped and new Instance and Typed variant describing + the validation behavior for the member with optional=False have been added. PR #123 + * consistently use Instance to wrap types passed to containers. PR #123 + For containers, Instance members used for validation are created with + optional=False by default. This is backward incompatible since None was always + a valid value previously. + * add strict argument to FloatRange. PR #124 + * allow to specify the type of ReadOnly and Constant. PR #128 + The validation is done using the Instance validator. The change for ReadOnly + is backward incompatible since the type or tuple of type is the first argument + in place of the default value. Specifying the default value by keyword is both + forward and backward compatible. + * use python stdlib IntEnum instead of the custom one in atom PR #122 + * remove the custom atom.IntEnum PR #122 + * add and distribute type hints PR #122 #132 + This allows static type checkers to resolve the values behind a member. + * drop official support for Python 3.6 and add support for Python 3.10 +- Stop building on Python 3.6 which is no longer supported + ------------------------------------------------------------------- Tue Jan 5 04:57:37 UTC 2021 - Steve Kowalik diff --git a/python-atom.spec b/python-atom.spec index 2131e33..cc0fb64 100644 --- a/python-atom.spec +++ b/python-atom.spec @@ -18,8 +18,9 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define skip_python2 1 +%define skip_python36 1 Name: python-atom -Version: 0.6.0 +Version: 0.7.0 Release: 0 Summary: Memory efficient Python objects License: BSD-3-Clause