Joffreybvn commented on code in PR #34964:
URL: https://github.com/apache/airflow/pull/34964#discussion_r1367719098
##########
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:
Coming back on this one:
This chunk of code was added back in 2017 in #2838 (I cannot access the
related Jira page), when the supported version were Python 2.7 to 3.4. There is
a similar one in 4faaa13a0de9372d72f04ffb2f85bd7a01e0c25d to make the hive hook
picklable.
Since Python 3.7, [loggers can be
pickled](https://docs.python.org/3/whatsnew/3.7.html#logging). Thus, unless
getstate / setstate are used for other things than pickling, I think this code
can be removed.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]