* allow Config.field to update a Field, fix#2426
* move logic to update_from_config, work with Annotated
* fix flake8 erroneous warnings
* test for allow_mutation
* better support for allow_mutation
* Support `Field` in `dataclass` + `'metadata'` kwarg of `dataclasses.field`
Please enter the commit message for your changes. Lines starting
* add `__has_field_info_default__` for minimal effect on perf
* lower complexity of `_process_class`
* fix(fields): handle properly default value for type `Callable`
closes#1596
* chore: move test in test_dataclasses
* chore: add comments
* test: rewrite test
* chore: remove useless variable
* fix(schema): add support when callable field has default value
closes#2086
* 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 <s@muelcolvin.com>
* fix: pydantic dataclasses can inherit from stdlib dataclasses
closes#2042
* docs: add some documentation
* fix: support arbitrary_types_allowed with stdlib dataclass
closes#2054
* docs: add documentation for custom types
* feat: pydantic dataclasses support built-in ones
closes#744
* feat: improve dataclass typing
* feat: add support for nested dataclasses
closes#1743
* feat: support dataclass schema with nested dataclasses
* refactor: remove `_dataclass_with_validation` function
* docs: add docstring for `make_dataclass_validator`
* refactor: rename DataclassType into Dataclass
The name `DataclassType` was missleading as it's not a `Type` per say.
* refactor: change global `dataclass` import to local
pydantic import time was improved in
https://github.com/samuelcolvin/pydantic/pull/1132
by keeping `dataclass` import local. So let's keep it that way!
* test: add extra nested case with BaseModel
* chore: s/pydantic/_pydantic_/g
* docs: add some documentation
* 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
* Better error for unsuported "typing" objects.
Fixes#745
Add a better error message for fields with types from the typing
module that are not directly supported by Pydantic. Previously,
it caused a cryptic assertion failure.
* Add support for frozenset fields.
Also provide an example of their usage.
Fixes#745
* Address review comments.
Fixes#745
* use equals not "is" for int comparison.
* Add support for InitVar
* Annotate *initvars as Any
* Simplify tests
* Add line to HISTORY.rst
* Use dataclasses.fields which also ignores ClassVars
* tweak history
* added feature post_init_post_parse
* fixed bug where post_init_post_parse was triggered without looking is post_init_original is set
* change double to single quotes
* __doc__ strings fixed back to double quote
* added better way of doing the post_init_post_parse also tests passes now
* removed unused file
* deleted unnecessary test
* update history.rst, changed previouis change 560 to breaking change because it broke the original flow
* update docs, added section post_init_post_parse under dataclasses
* added __post_init_post_parse__ as attribute of DataclassType
* Update HISTORY.rst
Co-Authored-By: Samuel Colvin <samcolvin@gmail.com>
* Update HISTORY.rst
Co-Authored-By: Samuel Colvin <samcolvin@gmail.com>
* Update pydantic/dataclasses.py
Co-Authored-By: Samuel Colvin <samcolvin@gmail.com>
* update docs, added subsection initialize hooks under dataclasses
* my bad
* make tests work again
* removed checking if post_init_parse is none
* correct typo in history
* fixed typo in history.rst
* Add support for passing Configs to Dataclasses
* formatting and fixes
* move tests into dataclasses_config.py
* use inherit_config in create_model
fix#276