ashb commented on a change in pull request #16110:
URL: https://github.com/apache/airflow/pull/16110#discussion_r640500018



##########
File path: airflow/models/baseoperator.py
##########
@@ -955,7 +955,7 @@ def __deepcopy__(self, memo):
 
         for k, v in self.__dict__.items():
             if k not in shallow_copy:
-                setattr(result, k, copy.deepcopy(v, memo))  # noqa
+                setattr(result, k, v if type(v).__name__ == 'module' else 
copy.deepcopy(v, memo))   # modules cannot be pickled

Review comment:
       What module is being copied? We've already got the shallow_copy_attrs 
list -- so anything not deep-copyable should probably go in that list




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to