uranusjr commented on code in PR #34964: URL: https://github.com/apache/airflow/pull/34964#discussion_r1369637078
########## 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: I don’t think we need to record `_log.name` at all? It is easily reconstructable from `_log_config_logger_name` and `_logger_name`. We can simply always set `self._log` to None and rely on logic in LoggingMixin to build that logger object when needed. -- 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