Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[REF-2089] Use dill instead of cloudpickle for serialization (#2922)
* Use dill instead of cloudpickle for serialization * smaller size pickles * support dynamically defined states * avoid issues with unpickleable globals * pyproject: add dill, remove cloudpickle * poetry.lock: relock dependencies * Dynamically convert EventHandler to functools.partial Instead of converting the functions up front and assigning them to the instance, unbox the function from the EventHandler when it is requested via __getattribute__. This reduces the size of the per-instance pickle, because event handler bodies do not need to be included. * Improve checking for cython_function_or_method Because pydantic can be installed without cython, only use the workaround in the case where the BaseModel.validate function is NOT a FunctionType, indicating it's a cython function. * Serialize all State subclasses by reference
- Loading branch information