casra-developers commented on a change in pull request #16110:
URL: https://github.com/apache/airflow/pull/16110#discussion_r640625247



##########
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:
       Good point. I am not sure if this comes from the different 
implementations of some dependencies between Windows and the other systems. 
This was basically one approach to get rid of the errors popping up without 
having to go through all the offending attributes. I will see if I can make 
this a bit less "hacky".




-- 
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