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

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

                Author: ASF GitHub Bot
            Created on: 12/Apr/18 08:41
            Start Date: 12/Apr/18 08:41
    Worklog Time Spent: 10m 
      Work Description: RobbeSneyders commented on a change in pull request 
#5053: [BEAM-3981] Futurize coders subpackage
URL: https://github.com/apache/beam/pull/5053#discussion_r181005567
 
 

 ##########
 File path: sdks/python/apache_beam/coders/coders.py
 ##########
 @@ -309,11 +318,6 @@ class ToStringCoder(Coder):
   """A default string coder used if no sink coder is specified."""
 
   def encode(self, value):
-    try:               # Python 2
-      if isinstance(value, unicode):
-        return value.encode('utf-8')
 
 Review comment:
   The `unicode = str` trick won't work here on Python 3:
   ```
   >>> str('test'.encode('utf-8'))
   "b'test'"
   ```
   I've reverted this change to the previous solution
   

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


Issue Time Tracking
-------------------

    Worklog Id:     (was: 90327)
    Time Spent: 8h  (was: 7h 50m)

> Futurize and fix python 2 compatibility for coders package
> ----------------------------------------------------------
>
>                 Key: BEAM-3981
>                 URL: https://issues.apache.org/jira/browse/BEAM-3981
>             Project: Beam
>          Issue Type: Sub-task
>          Components: sdk-py-core
>            Reporter: Robbe
>            Assignee: Ahmet Altay
>            Priority: Major
>          Time Spent: 8h
>  Remaining Estimate: 0h
>
> Run automatic conversion with futurize tool on coders subpackage and fix 
> python 2 compatibility. This prepares the subpackage for python 3 support.



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

Reply via email to