[ 
https://issues.apache.org/jira/browse/BEAM-5319?focusedWorklogId=183326&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-183326
 ]

ASF GitHub Bot logged work on BEAM-5319:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 09/Jan/19 21:32
            Start Date: 09/Jan/19 21:32
    Worklog Time Spent: 10m 
      Work Description: tvalentyn commented on pull request #7445: [BEAM-5319] 
Python 3 port runners module
URL: https://github.com/apache/beam/pull/7445#discussion_r246552757
 
 

 ##########
 File path: sdks/python/apache_beam/runners/interactive/cache_manager.py
 ##########
 @@ -202,7 +202,8 @@ class SafeFastPrimitivesCoder(coders.Coder):
   # pylint: disable=deprecated-urllib-function
 
   def encode(self, value):
-    return quote(coders.coders.FastPrimitivesCoder().encode(value))
+    return quote(coders.coders.FastPrimitivesCoder().encode(value)).encode(
+        'utf-8')
 
   def decode(self, value):
     return coders.coders.FastPrimitivesCoder().decode(unquote_to_bytes(value))
 
 Review comment:
   My concern was whether a encode+decode operation would be idempotent for all 
inputs. Since the output of `quote` will be an ASCII string, additional 
`decode('utf-8')` in Line 209 won't not make any difference as 
`unquote_to_bytes` happily accepts `bytes`, so we should be fine with the code 
as is.
 
----------------------------------------------------------------
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: 183326)
    Time Spent: 5h  (was: 4h 50m)

> Finish Python 3 porting for runners module
> ------------------------------------------
>
>                 Key: BEAM-5319
>                 URL: https://issues.apache.org/jira/browse/BEAM-5319
>             Project: Beam
>          Issue Type: Sub-task
>          Components: sdk-py-core
>            Reporter: Robbe
>            Assignee: Robbe
>            Priority: Major
>          Time Spent: 5h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to