Joffreybvn commented on code in PR #34964: URL: https://github.com/apache/airflow/pull/34964#discussion_r1370774789
########## airflow/models/baseoperator.py: ########## @@ -1218,15 +1225,17 @@ def __deepcopy__(self, memo): result.__instantiated = self.__instantiated return result - def __getstate__(self): + def __getstate__(self) -> dict: state = dict(self.__dict__) - del state["_log"] + state["_log"] = self._log.name if self._log else None Review Comment: > We can simply always set `self._log` to None and rely on logic in LoggingMixin to build that logger object when needed. Updated the PR. It's indeed simpler like this. Thanks ! -- 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