[
https://issues.apache.org/jira/browse/BEAM-5953?focusedWorklogId=165082&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-165082
]
ASF GitHub Bot logged work on BEAM-5953:
----------------------------------------
Author: ASF GitHub Bot
Created on: 12/Nov/18 19:52
Start Date: 12/Nov/18 19:52
Worklog Time Spent: 10m
Work Description: tvalentyn commented on a change in pull request #7011:
[BEAM-5953] Fix DataflowRunner in Python 3 - type errors
URL: https://github.com/apache/beam/pull/7011#discussion_r232790969
##########
File path: sdks/python/apache_beam/internal/gcp/json_value.py
##########
@@ -105,7 +105,9 @@ def to_json_value(obj, with_type=False):
return extra_types.JsonValue(object_value=json_object)
elif with_type:
return to_json_value(get_typed_value_descriptor(obj), with_type=False)
- elif isinstance(obj, (str, unicode)):
+ elif isinstance(obj, (str, unicode, bytes)):
Review comment:
I'd suggest to make a separate branch for `bytes`:
```
elif isinstance(obj, bytes):
return extra_types.JsonValue(string_value=obj.decode('utf-8'))
```
To keep the existing behavior on Python 2, we can place this branch after
` elif isinstance(obj, (str, unicode)):` branch.
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 165082)
Time Spent: 0.5h (was: 20m)
> Support DataflowRunner on Python 3
> ----------------------------------
>
> Key: BEAM-5953
> URL: https://issues.apache.org/jira/browse/BEAM-5953
> Project: Beam
> Issue Type: Sub-task
> Components: sdk-py-core
> Reporter: Mark Liu
> Assignee: Mark Liu
> Priority: Major
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)