uranusjr commented on code in PR #34964:
URL: https://github.com/apache/airflow/pull/34964#discussion_r1368310596


##########
airflow/models/baseoperator.py:
##########
@@ -1219,14 +1226,10 @@ def __deepcopy__(self, memo):
         return result
 
     def __getstate__(self):
-        state = dict(self.__dict__)
-        del state["_log"]
-
-        return state
+        return dict(self.__dict__)

Review Comment:
   I think the main purpose is still for pickling although maybe something was 
added that also depended on it (don’t know). But since we have the needed 
information anyway, I would suggest still keeping this removal/rebuild code if 
only for performance.



##########
airflow/models/baseoperator.py:
##########
@@ -1219,14 +1226,10 @@ def __deepcopy__(self, memo):
         return result
 
     def __getstate__(self):
-        state = dict(self.__dict__)
-        del state["_log"]
-
-        return state
+        return dict(self.__dict__)

Review Comment:
   I think the main purpose is still for pickling although maybe something was 
added that also depended on it (don’t know). But since we have the needed 
information anyway, I would suggest still keeping this removal/rebuild code if 
only for performance.



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

To unsubscribe, e-mail: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to