* Rename skip-defaults, and add ability to exclude actual defaults
* Add __defaults__ and deprecation warnings
* Add note about `skip_defaults` to docs
* Incorporate feedback
* Add tests and changes
* Fix reference to .json()
It think it's a good idea given that some features that are mentioned in the documentation (such as `root_validator`) are not yet in the current PyPI version.
* Merge init_kwargs with env variables recursively to handle nested values
This commit implements `deep_update` function that works as standard
`update` method on dicts, but also recursively updates all the nested
dict values. It allows splitting init arguments between environment
variables and in-code values, as long as they create a valid object
when merged together.
* Add entry to changes directory
* Fix CI/CD checks
* Make deep_copy not mutating, improve tests and type annotations
* starting insert prints
* working exec_script
* remove prints, fix exec_examples.py
* more cleanup of examples, better model printing
* upgrade netlify runtime
* extra docs deps
* few more small tweaks
* Fix#867 by accepting and passing on **kwargs in ModelMetaclass.__new__
pydantic.main.MetaModel.__new__ should include **kwargs at the end of
the method definition and pass them on to the super call at the end in
order to allow the special method __init_subclass__ to be defined with
custom parameters on extended BaseModel classes.
* MetaModel -> ModelMetaclass
* shrink change notes
* rename and reformat change description
* moving docs to mkdocs
* transfering readme to md and more
* fixing build
* splitting usage.md
* improving schema.md and index.md
* fix make_history.rst
* models intro
* working on data conversation and required fields
* more fixes to models.md
* list all standard types supported
* list of pydantic types
* tweaks
* update links in code
* Apply suggestions from code review
incorporate @dmontagu's suggestions.
Co-Authored-By: dmontagu <35119617+dmontagu@users.noreply.github.com>
* Apply suggestions from code review
more missed suggestions.
Co-Authored-By: dmontagu <35119617+dmontagu@users.noreply.github.com>
* Apply suggestions from code review
more corrects.
* cleanup
* Field order warning
* fix and regenerate benchmarks
* format examples better, cleanup
* improve schema mapping table
* correct highlighting file types in schema.md
* add redirects in javascript
* add logo
* fix(validate-assignment): do not validate extra fields when `vaidate_assignment` is on
* Update history
* Fix `value` vs. `value_`
* Add tests for `value` vs `value_` case
* uprev
* Fix generic required (#742)
* Fix required fields on GenericModel
* lint
* version up
* __post_init__ with inheritance, fix#739 (#740)
* Fix custom Schema on GenericModel fields (#754)
* Fix custom Schema on GenericModel fields
* Add PR#
* uprev
* Fix error messages for Literal types with multiple allowed values (#770)
* Fix error messages for Literal types with multiple allowed values
* Incorporate feedback
* update history
* rename Schema to Field
* add Schema function with deprecation warning
* mypy tests and other tweaks
* tweaks and cleanup
* Update pydantic/fields.py
Co-Authored-By: Sebastián Ramírez <tiangolo@gmail.com>
* root validators and rename __obj__ -> __root__
* implement root validation
* tweak Validator
* dataclass and generic tests, docs
* repeat and signature checks
* fix inheritance
* tweaks tests and var names
* improvements to 'from_orm' to work better with root validators (#822)
* improvements to 'from_orm' to work better with root validators
* cython compatibility and tweaks
* tweak config order
* added test for derived classes using custom getter_dict config (#833)
* added test for derived classes using custom getter_dict config
* fix linting
* fix formatting
* cleanup
* Add failing generic subclass test
* Only raise type parameter failure on base GenericModel class
* Add changes to describe PR #842
* Change the class check to use is
* Fix formatting in subclass test
* correct change