From 2d2e1aa133d6510c1f4394e9bffad023ed0188f3cf88e329b5715831d289e87c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Sun, 19 Apr 2020 09:15:51 +0000 Subject: [PATCH] Accepting request 795387 from home:mnhauke - Update to version 1.5 * Make includes/excludes arguments for .dict(), ._iter(), ..., immutable * Always use a field's real name with includes/excludes in model._iter(), regardless of by_alias, #1397 by @AlexECX * Update constr regex example to include start and end lines, * Confirm that shallow model.copy() does make a shallow copy of attributes * Renaming model_name argument of main.create_model() to __model_name to allow using model_name as a field name * Replace raising of exception to silent passing for non-Var attributes in mypy plugin * Remove typing_extensions dependency for python 3.8 * Make SecretStr and SecretBytes initialization idempotent * document making secret types dumpable using the json method * fix card number length check in PaymentCardNumber, PaymentCardBrand now inherits from str * Have BaseModel inherit from Representation to make mypy happy when overriding __str__ * Allow None as input to all optional list fields * Add datetime field to default_factory example * Allow subclasses of known types to be encoded with superclass encoder * Exclude exported fields from all elements of a list/tuple of submodels/dicts with '__all__', #1286 by @masalim2 * Add pydantic.color.Color objects as available input for Color fields * In examples, type nullable fields as Optional, so that these are valid mypy annotations * Make pattern_validator() accept pre-compiled Pattern objects. OBS-URL: https://build.opensuse.org/request/show/795387 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pydantic?expand=0&rev=6 --- python-pydantic.changes | 46 +++++++++++++++++++++++++++++++++++++++++ python-pydantic.spec | 3 +-- v1.4.tar.gz | 3 --- v1.5.tar.gz | 3 +++ 4 files changed, 50 insertions(+), 5 deletions(-) delete mode 100644 v1.4.tar.gz create mode 100644 v1.5.tar.gz diff --git a/python-pydantic.changes b/python-pydantic.changes index 398120a..70a0e8e 100644 --- a/python-pydantic.changes +++ b/python-pydantic.changes @@ -1,3 +1,49 @@ +------------------------------------------------------------------- +Sat Apr 18 19:11:39 UTC 2020 - Martin Hauke + +- Update to version 1.5 + * Make includes/excludes arguments for .dict(), ._iter(), ..., + immutable + * Always use a field's real name with includes/excludes in + model._iter(), regardless of by_alias, #1397 by @AlexECX + * Update constr regex example to include start and end lines, + * Confirm that shallow model.copy() does make a shallow copy of + attributes + * Renaming model_name argument of main.create_model() + to __model_name to allow using model_name as a field name + * Replace raising of exception to silent passing for non-Var + attributes in mypy plugin + * Remove typing_extensions dependency for python 3.8 + * Make SecretStr and SecretBytes initialization idempotent + * document making secret types dumpable using the json method + * fix card number length check in PaymentCardNumber, + PaymentCardBrand now inherits from str + * Have BaseModel inherit from Representation to make mypy happy + when overriding __str__ + * Allow None as input to all optional list fields + * Add datetime field to default_factory example + * Allow subclasses of known types to be encoded with superclass + encoder + * Exclude exported fields from all elements of a list/tuple of + submodels/dicts with '__all__', #1286 by @masalim2 + * Add pydantic.color.Color objects as available input for Color + fields + * In examples, type nullable fields as Optional, so that these + are valid mypy annotations + * Make pattern_validator() accept pre-compiled Pattern objects. + Fix str_validator() return type to str + * Support instance methods and class methods with + @validate_arguments + * Add default_factory argument to Field to create a dynamic + default value by passing a zero-argument callable + * add support for NewType of List, Optional, etc + * fix mypy signature for root_validator + * Fixed parsing of nested 'custom root type' models + * Add validate_arguments function decorator which checks the + arguments to a function matches type annotations + * Add __signature__ to models + * Refactor ._iter() method, 10x speed boost for dict(model) + ------------------------------------------------------------------- Thu Mar 19 13:25:26 UTC 2020 - Marketa Calabkova diff --git a/python-pydantic.spec b/python-pydantic.spec index c9f792c..01df2f5 100644 --- a/python-pydantic.spec +++ b/python-pydantic.spec @@ -20,7 +20,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define skip_python2 1 Name: python-pydantic -Version: 1.4 +Version: 1.5 Release: 0 Summary: Data validation and settings management using python type hinting License: MIT @@ -32,7 +32,6 @@ BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros Suggests: python-email-validator >= 1.0.3 -Suggests: python-typing-extensions >= 3.7.2 Suggests: python-ujson >= 1.35 BuildArch: noarch %python_subpackages diff --git a/v1.4.tar.gz b/v1.4.tar.gz deleted file mode 100644 index 6eac770..0000000 --- a/v1.4.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:49d8502e5c55d3bb14afa81931bb877baeb40c142e90f663b4c85383b7155be5 -size 217761 diff --git a/v1.5.tar.gz b/v1.5.tar.gz new file mode 100644 index 0000000..3e29417 --- /dev/null +++ b/v1.5.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:72ec81ce373641cafbbaae4bba6ed0be2e790a5f66c97328b922482e3352fa88 +size 233291