Files
pydantic/changes
Arseny Boykov 6b53cabe03 Add pickle support to dynamically created models and generics (#1686)
* Add pickle support to dynamically created models

* Add created model module check

* Use globals() to retrieve model

* Use single quotes

* use mocker instead of mock

Co-authored-by: PrettyWood <em.jolibois@gmail.com>

* remove unused import

* add test for dynamic forward ref

* move generic test to test_generics.py

* fix test_generic_model_pickle test, add additional check for <locals> in create_model

* fix code style

* resolve issues with global/local models

* make ensure_picklable return given model

* remove ensure_picklable, use test_is_call_from_module only in generics

* reformat code after updating black==20.8b1

* move get_caller_module_name and is_call_from_module to generics

* apply suggestions from @samuelcolvin

* add tests for get_caller_module and is_call_from_module called from module

* fix linting

* fix path to modules in test_module fixture, capture stderr and stdout

* fix broken test module

* fix subprocess call for windows

* enhance create_module fixture, add run_as_module fixture

this will allow run modules in subprocess and define module code in functions-containers

* add test for redefined concrete model without cache

* add changes file

* remove unused variable

* rewrite tests with pytest.raises

* fix linting

* rewrite test_create_model_pickle and test_forward_ref_with_create_model with module definition in function

* Update create_model docstring

Co-authored-by: PrettyWood <em.jolibois@gmail.com>
Co-authored-by: Samuel Colvin <s@muelcolvin.com>
2020-10-18 20:55:44 +01:00
..
2020-10-08 21:07:22 +01:00
2019-10-07 17:19:01 +01:00

Pending Changes

This directory contains files describing changes to pydantic since the last release.

If you're creating a pull request, please add a new file to this directory called <pull request or issue id>-<github username>.md. It should be formatted as a single paragraph of markdown

The contents of this file will be used to update HISTORY.md before the next release.