potiuk commented on pull request #10301:
URL: https://github.com/apache/airflow/pull/10301#issuecomment-673684296


   I think I saw at least in one place in the code where we had to do a 
conditional - as sometimes  bytes and sometimes stirngs were returned. I am not 
sure if it was not because of python2 vs python3 - I think not though. 
   
   It was likely kubernetes API issue. @dimberman do you recall that ?
   
   Maybe just for safety we could do something like:
   
   Python 3:
   ```
   [x.encode('utf-8') if isinstance(x, str) else x for x in items]
   ``` 
   
   But then if we cherry-pick it to 1.10 it should become:
   
   ```
   [x.encode('utf-8') if isinstance(x, future.text_type) else x for x in items]
   ```
   


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


Reply via email to