prepare v1.5 release

This commit is contained in:
Samuel Colvin
2020-04-18 17:32:16 +01:00
parent cab6313798
commit 67acb659c2
33 changed files with 38 additions and 42 deletions
+35
View File
@@ -1,3 +1,36 @@
## v1.5 (2020-04-18)
* Make includes/excludes arguments for `.dict()`, `._iter()`, ..., immutable, #1404 by @AlexECX
* 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, #1396 by @lmcnearney
* Confirm that shallow `model.copy()` does make a shallow copy of attributes, #1383 by @samuelcolvin
* Renaming `model_name` argument of `main.create_model()` to `__model_name` to allow using `model_name` as a field name, #1367 by @kittipatv
* Replace raising of exception to silent passing for non-Var attributes in mypy plugin, #1345 by @b0g3r
* Remove `typing_extensions` dependency for python 3.8, #1342 by @prettywood
* Make `SecretStr` and `SecretBytes` initialization idempotent, #1330 by @atheuz
* document making secret types dumpable using the json method, #1328 by @atheuz
* Move all testing and build to github actions, add windows and macos binaries,
thank you @StephenBrown2 for much help, #1326 by @samuelcolvin
* fix card number length check in `PaymentCardNumber`, `PaymentCardBrand` now inherits from `str`, #1317 by @samuelcolvin
* Have `BaseModel` inherit from `Representation` to make mypy happy when overriding `__str__`, #1310 by @FuegoFro
* Allow `None` as input to all optional list fields, #1307 by @prettywood
* Add `datetime` field to `default_factory` example, #1301 by @StephenBrown2
* Allow subclasses of known types to be encoded with superclass encoder, #1291 by @StephenBrown2
* 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, #1258 by @leosussan
* In examples, type nullable fields as `Optional`, so that these are valid mypy annotations, #1248 by @kokes
* Make `pattern_validator()` accept pre-compiled `Pattern` objects. Fix `str_validator()` return type to `str`, #1237 by @adamgreg
* Document how to manage Generics and inheritance, #1229 by @esadruhn
* `update_forward_refs()` method of BaseModel now copies `__dict__` of class module instead of modyfying it, #1228 by @paul-ilyin
* Support instance methods and class methods with `@validate_arguments`, #1222 by @samuelcolvin
* Add `default_factory` argument to `Field` to create a dynamic default value by passing a zero-argument callable, #1210 by @prettywood
* add support for `NewType` of `List`, `Optional`, etc, #1207 by @Kazy
* fix mypy signature for `root_validator`, #1192 by @samuelcolvin
* Fixed parsing of nested 'custom root type' models, #1190 by @Shados
* Add `validate_arguments` function decorator which checks the arguments to a function matches type annotations, #1179 by @samuelcolvin
* Add `__signature__` to models, #1034 by @MrMrRobat
* Refactor `._iter()` method, 10x speed boost for `dict(model)`, #1017 by @MrMrRobat
## v1.4 (2020-01-24)
* **Breaking Change:** alias precedence logic changed so aliases on a field always take priority over
@@ -160,6 +193,8 @@
## v0.32.2 (2019-08-17)
(Docs are available [here](https://5d584fcca7c9b70007d1c997--pydantic-docs.netlify.com))
* fix `__post_init__` usage with dataclass inheritance, fix #739 by @samuelcolvin
* fix required fields validation on GenericModels classes, #742 by @amitbl
* fix defining custom `Schema` on `GenericModel` fields, #754 by @amitbl
-1
View File
@@ -1 +0,0 @@
Refactor `._iter()` method, 10x speed boost for `dict(model)`
-1
View File
@@ -1 +0,0 @@
Add `__signature__` to models
-1
View File
@@ -1 +0,0 @@
Add `validate_arguments` function decorator which checks the arguments to a function matches type annotations.
-1
View File
@@ -1 +0,0 @@
Fixed parsing of nested 'custom root type' models.
-1
View File
@@ -1 +0,0 @@
fix mypy signature for `root_validator`
-1
View File
@@ -1 +0,0 @@
add support for `NewType` of `List`, `Optional`, etc.
-1
View File
@@ -1 +0,0 @@
Add `default_factory` argument to `Field` to create a dynamic default value by passing a zero-argument callable.
-1
View File
@@ -1 +0,0 @@
Support instance methods and class methods with `@validate_arguments`
-1
View File
@@ -1 +0,0 @@
`update_forward_refs()` method of BaseModel now copies `__dict__` of class module instead of modyfying it
-1
View File
@@ -1 +0,0 @@
Document how to manage Generics and inheritance.
-1
View File
@@ -1 +0,0 @@
Make `pattern_validator()` accept pre-compiled `Pattern` objects. Fix `str_validator()` return type to `str`.
-1
View File
@@ -1 +0,0 @@
In examples, type nullable fields as `Optional`, so that these are valid mypy annotations.
-1
View File
@@ -1 +0,0 @@
Add pydantic.color.Color objects as available input for Color fields
-1
View File
@@ -1 +0,0 @@
Exclude exported fields from all elements of a list/tuple of submodels/dicts with `'__all__'`.
-1
View File
@@ -1 +0,0 @@
Allow subclasses of known types to be encoded with superclass encoder
-1
View File
@@ -1 +0,0 @@
Add `datetime` field to `default_factory` example
-1
View File
@@ -1 +0,0 @@
Allow `None` as input to all optional list fields
-1
View File
@@ -1 +0,0 @@
Have `BaseModel` inherit from `Representation` to make mypy happy when overriding `__str__`.
-1
View File
@@ -1 +0,0 @@
fix card number length check in `PaymentCardNumber`, `PaymentCardBrand` now inherits from `str`.
-2
View File
@@ -1,2 +0,0 @@
Move all testing and build to github actions, add windows and macos binaries,
thank you @StephenBrown2 for much help
-1
View File
@@ -1 +0,0 @@
document making secret types dumpable using the json method
-1
View File
@@ -1 +0,0 @@
Make `SecretStr` and `SecretBytes` initialization idempotent
-1
View File
@@ -1 +0,0 @@
Remove `typing_extensions` dependency for python 3.8
-1
View File
@@ -1 +0,0 @@
Replace raising of exception to silent passing for non-Var attributes in mypy plugin
-1
View File
@@ -1 +0,0 @@
Renaming `model_name` argument of `main.create_model()` to `__model_name` to allow using `model_name` as a field name.
-1
View File
@@ -1 +0,0 @@
Confirm that shallow `model.copy()` does make a shallow copy of attributes.
-1
View File
@@ -1 +0,0 @@
Update constr regex example to include start and end lines
-1
View File
@@ -1 +0,0 @@
Always use a field's real name with includes/excludes in `model._iter()`, regardless of `by_alias`.
-1
View File
@@ -1 +0,0 @@
Make includes/excludes arguments for `.dict()`, `._iter()`, ..., immutable.
+1 -5
View File
@@ -1,4 +1,4 @@
[![CI](https://github.com/samuelcolvin/pydantic/workflows/CI/badge.svg)](https://github.com/samuelcolvin/pydantic/actions?query=workflow%3ACI)
[![CI](https://github.com/samuelcolvin/pydantic/workflows/CI/badge.svg?event=push)](https://github.com/samuelcolvin/pydantic/actions?query=event%3Apush+branch%3Amaster+workflow%3ACI)
[![Coverage](https://codecov.io/gh/samuelcolvin/pydantic/branch/master/graph/badge.svg)](https://codecov.io/gh/samuelcolvin/pydantic)
[![pypi](https://img.shields.io/pypi/v/pydantic.svg)](https://pypi.python.org/pypi/pydantic)
[![CondaForge](https://img.shields.io/conda/v/conda-forge/pydantic.svg)](https://anaconda.org/conda-forge/pydantic)
@@ -13,10 +13,6 @@ Data validation and settings management using python type annotations.
Define how data should be in pure, canonical python; validate it with *pydantic*.
!!! note "Version 0.32 Documentation"
This documentation refers to Version 1 of *pydantic* which has just been released, **v0.32.2**
(the previous release) docs are available [here](https://5d584fcca7c9b70007d1c997--pydantic-docs.netlify.com).
## Example
```py
-5
View File
@@ -263,11 +263,6 @@ For example, in the example above, if `_fields_set` was not provided,
## Generic Models
!!! note
New in version **v0.29**.
This feature requires Python 3.7+.
Pydantic supports the creation of generic models to make it easier to reuse a common model structure.
In order to declare a generic model, you perform the following steps:
+2 -2
View File
@@ -1,6 +1,6 @@
__all__ = ['VERSION', 'version_info']
__all__ = 'VERSION', 'version_info'
VERSION = '1.5a1'
VERSION = '1.5'
def version_info() -> str: