maganaluis commented on a change in pull request #8256: updated _write_args on 
PythonVirtualenvOperator
URL: https://github.com/apache/airflow/pull/8256#discussion_r409112631
 
 

 ##########
 File path: airflow/operators/python_operator.py
 ##########
 @@ -330,13 +330,28 @@ def _write_string_args(self, filename):
 
     def _write_args(self, input_filename):
         # serialize args to file
+        if self.use_dill:
+            serializer = dill
+        else:
+            serializer = pickle
+        # some args from context can't be loaded in virtual env
+        invalid_args = set(['dag', 'task', 'ti'])
 
 Review comment:
   @jloehel I don't mind if the PR doesn't merge, as long as PythonVirtualenvOp 
gets fixed, I think that will help a lot people. Feel free to send me an e-mail 
if you would like to follow up in case I need to modify that function again. 
Should be in my profile. Cheers :) 

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to