* 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>
* support postponed annotations in python 3.7
* support for full ForwardRef
* tweak update_forward_refs
* better ForwardRef resolution
* remove debug, fix linting
* fix comments
* docs and history