potiuk commented on code in PR #41039:
URL: https://github.com/apache/airflow/pull/41039#discussion_r1703573760


##########
airflow/utils/python_virtualenv.py:
##########
@@ -149,3 +157,76 @@ def write_python_script(
         )
     template = template_env.get_template("python_virtualenv_script.jinja2")
     template.stream(**jinja_context).dump(filename)
+
+
+def context_to_json(context: Context) -> str:

Review Comment:
   We have this https://github.com/apache/airflow/issues/40974 -> and 
introducing `yet` another serialization mechanism where wwe have quite a few 
already is rather against the direction we want to take, so I'd say "even if 
not perfect, having a single way to do same thing is probably better than 
having few ways". 
   
   One thing that the BaseSerialization currently does is that it gets 
extensively tested  - and things like macros and accessors were result of it - 
so I'd say we should use what's there.



-- 
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

Reply via email to