Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SDK - Components - Hiding signature attribute from CloudPickle (#2045)
* SDK - Components - Hiding signature attribute from CloudPickle Cloudpickle has some issues with pickling type annotations in python versions < 3.7, so they disabled it. cloudpipe/cloudpickle#196 `create component_from_airflow_op` spoofs the function signature by setting the `func.__signature__` attribute. cloudpickle then tries to pickle that attribute which leads to failures during unpickling. To prevent this we remove the `.__signature__` attribute before pickling. * Added comments # Hack to prevent cloudpickle from trying to pickle generic types that might be present in the signature. See cloudpipe/cloudpickle#196 # Currently the __signature__ is only set by Airflow components as a means to spoof/pass the function signature to _func_to_component_spec
- Loading branch information