From 2f439eff0d2f9272aad00a13669ac54c1d00a216 Mon Sep 17 00:00:00 2001 From: Samuel Colvin Date: Fri, 1 Jan 2021 14:19:24 +0000 Subject: [PATCH] v1.7 patch (currently v1.7.3) (#2161) * fix: ignore `__doc__` as valid private attribute (#2091) closes #2090 * Fixes a regression where Enum fields would not propagate keyword arguments to the schema (#2109) fix #2108 * Fix schema extra not being included when field type is Enum * Code format * More code format * Add changes file Co-authored-by: Ben Martineau * fix: update all modified field values in `root_validator` when `validate_assignment` is on (#2119) * fix: update all modified field values in `root_validator` when `validate_assignment` is on closes #2116 * chore: update root_validator name Co-authored-by: Arthur Pastel Co-authored-by: Arthur Pastel * fix: support `underscore_attrs_are_private` with generic models (#2139) closes #2138 * fix: set right default value for required (optional) fields (#2143) closes #2142 * Fix #2111: support pickle for built-in dataclasses (#2114) * 2111: support pickle for built-in dataclasses * 2111: add changes * 2111: simplify test * return original name + handle similar names * add additional check * fix a misspell * remove useless f-string * cleanup test Co-authored-by: Samuel Colvin * uprev and add history * tempoarily pin pip Co-authored-by: Eric Jolibois Co-authored-by: Ben Martineau Co-authored-by: Ben Martineau Co-authored-by: Arthur Pastel Co-authored-by: aimestereo --- HISTORY.md | 13 +++++++++++++ pydantic/utils.py | 3 ++- pydantic/version.py | 2 +- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index 692c8e2..c5aeda5 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,3 +1,16 @@ +## v1.7.3 (2020-11-30) + +Thank you to pydantic's sponsors: +@timdrijvers, @BCarley, @chdsbd, @tiangolo, @matin, @linusg, @kevinalh, @jorgecarleitao, @koxudaxi, @primer-api, +@mkeen, @meadsteve for their kind support. + +* fix: set right default value for required (optional) fields, #2142 by @PrettyWood +* fix: support `underscore_attrs_are_private` with generic models, #2138 by @PrettyWood +* fix: update all modified field values in `root_validator` when `validate_assignment` is on, #2116 by @PrettyWood +* Allow pickling of `pydantic.dataclasses.dataclass` dynamically created from a built-in `dataclasses.dataclass`, #2111 by @aimestereo +* Fix a regression where Enum fields would not propagate keyword arguments to the schema, #2109 by @bm424 +* Ignore `__doc__` as private attribute when `Config.underscore_attrs_are_private` is set, #2090 by @PrettyWood + ## v1.7.2 (2020-11-01) * fix slow `GenericModel` concrete model creation, allow `GenericModel` concrete name reusing in module, #2078 by @MrMrRobat diff --git a/pydantic/utils.py b/pydantic/utils.py index 1a2c2cb..ab2f3bc 100644 --- a/pydantic/utils.py +++ b/pydantic/utils.py @@ -646,7 +646,8 @@ _EMPTY = object() def all_identical(left: Iterable[Any], right: Iterable[Any]) -> bool: - """Check that the items of `left` are the same objects as those in `right`. + """ + Check that the items of `left` are the same objects as those in `right`. >>> a, b = object(), object() >>> all_identical([a, b, a], [a, b, a]) diff --git a/pydantic/version.py b/pydantic/version.py index 4ba6f2d..dd840e9 100644 --- a/pydantic/version.py +++ b/pydantic/version.py @@ -1,6 +1,6 @@ __all__ = 'VERSION', 'version_info' -VERSION = '1.7.2' +VERSION = '1.7.3' def version_info() -> str: