kaxil commented on a change in pull request #15822:
URL: https://github.com/apache/airflow/pull/15822#discussion_r631840495



##########
File path: airflow/models/dag.py
##########
@@ -1463,13 +1463,8 @@ def partial_subset(
         """
         # deep-copying self.task_dict and self._task_group takes a long time, 
and we don't want all
         # the tasks anyway, so we copy the tasks manually later
-        task_dict = self.task_dict
-        task_group = self._task_group
-        self.task_dict = {}
-        self._task_group = None  # type: ignore
-        dag = copy.deepcopy(self)
-        self.task_dict = task_dict
-        self._task_group = task_group
+        memo = {id(self.task_dict): None, id(self._task_group): None}
+        dag = copy.deepcopy(self, memo)  # type: ignore

Review comment:
       Should we remove the comments on L1464 & L1465 now or update it to 
reflect the change?




-- 
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:
us...@infra.apache.org


Reply via email to