fix#1067
* Making json_loads available to parse_file
* Change BaseModel.parse_file to use Config.json_loads
* Update changes/1067-kierandarcy.md
Co-Authored-By: Samuel Colvin <samcolvin@gmail.com>
* Fixed some style issues and added missing test for parse_file_as
* 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
* support custom root types
* update HISTORY.rst for costom root types
* fix invalid arguments case
* remove the keyword argument of "__root__" in __init__
add a keyword argument of "__root__" in parse_obj
fix documents
create a method for cheking valid field name
* fix parse_obj
* Update docs/index.rst
Co-Authored-By: Samuel Colvin <samcolvin@gmail.com>
* Apply suggestions from code review
Co-Authored-By: Samuel Colvin <samcolvin@gmail.com>
* add type cheking for custom root type
* Update docs/index.rst
Co-Authored-By: Samuel Colvin <samcolvin@gmail.com>
* Update index.rst
* feat: implement const keyword in Schema
Fix#434.
* make fields marked `const` optional
* move `const` out of the `Field`
* check that `schema` is not `None` instead of using `getattr`
* tweak constant error
fix#378
* Tracking for setting attributes
* Fixes accidental leak of fields
* Allows defaults fields to be recursively set
* Docs and history for skip_defaults
* Mypy fix on calculate keys
* Update pydantic/main.py
Co-Authored-By: dgasmith <dgasmith@icloud.com>
* Update pydantic/main.py
Co-Authored-By: dgasmith <dgasmith@icloud.com>
* Update HISTORY.rst
Co-Authored-By: dgasmith <dgasmith@icloud.com>
* Cleanup pass based off review
* Simplifies constructors based on feedback
* Makes mypy happy with exlicit KeysView
* SetOrKeys and faster key search
* Formats files once more
* add tests for dict, pickle and construct
* fixes for dict, pickle and construct
* correct field_set for extra.ignore
* Fixes format
* Get rid of `track` in errors
* Move `display_as_type` func into utils module
* Get rid of error as `namedtuple`
* Renamed `Error.index` to `Error.loc`
* New way to get error type
* New way to get error message
* New errors format
* Renamed `flatten_errors` property to `flat_errors`
* `__slots__` for `Error` and `ValidationError`
* `loc` as `tuple`
* Tests
* Review fixes
* `flatten_errors` as generator
* working on parsers
* starting parse tests
* proper tests for parse
* adding parse docs
* tweaks and history
* add test for datetime direct, fix tests
* tweak docs