uranusjr commented on a change in pull request #21210:
URL: https://github.com/apache/airflow/pull/21210#discussion_r798403590
##########
File path: airflow/serialization/serialized_objects.py
##########
@@ -1086,8 +1087,15 @@ def deserialize_task_group(
for key in ["prefix_group_id", "tooltip", "ui_color", "ui_fgcolor"]
}
group = SerializedTaskGroup(group_id=group_id,
parent_group=parent_group, **kwargs)
+
+ ref = weakref.proxy(group)
+
+ def set_ref(task: BaseOperator) -> BaseOperator:
+ task.task_group = ref
+ return task
Review comment:
Not really; the two are actually equivalent because proxy is implemented
to return the same thing from one object.
```pycon
>>> import weakref
>>> class A: pass
...
>>> a = A()
>>> id(weakref.proxy(a))
139967946164800
>>> id(weakref.proxy(a))
139967946164800
```
--
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]