superset-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [incubator-superset] john-bodley commented on a change in pull request #6987: Add support for postgres bytea type
Date Sat, 16 Mar 2019 00:14:12 GMT
john-bodley commented on a change in pull request #6987: Add support for postgres bytea type
URL: https://github.com/apache/incubator-superset/pull/6987#discussion_r266179401
 
 

 ##########
 File path: superset/utils/core.py
 ##########
 @@ -340,6 +340,8 @@ def base_json_conv(obj):
         return str(obj)
     elif isinstance(obj, timedelta):
         return str(obj)
+    elif isinstance(obj, memoryview):
+        return str(obj.tobytes(), 'utf8')
 
 Review comment:
   This behavior is explained in the documentation for [`str`](https://docs.python.org/3/library/stdtypes.html#str)
and in your case you do need (as you have) to explicitly define the encoding even if it's
the default. Obviously not the clearest logic.

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Mime
View raw message