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

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

                Author: ASF GitHub Bot
            Created on: 16/May/18 21:25
            Start Date: 16/May/18 21:25
    Worklog Time Spent: 10m 
      Work Description: tvalentyn commented on a change in pull request #5053: 
[BEAM-3981] Futurize coders subpackage
URL: https://github.com/apache/beam/pull/5053#discussion_r188777797
 
 

 ##########
 File path: sdks/python/apache_beam/coders/coders.py
 ##########
 @@ -210,11 +216,15 @@ def as_cloud_object(self):
   def __repr__(self):
     return self.__class__.__name__
 
+  # pylint: disable=protected-access
   def __eq__(self, other):
-    # pylint: disable=protected-access
     return (self.__class__ == other.__class__
             and self._dict_without_impl() == other._dict_without_impl())
-    # pylint: enable=protected-access
+
+  def __hash__(self):
 
 Review comment:
   Revisiting this in light of other PRs. I think, it would be safer to 
guarantee the contract that hash does not change for the same object if we 
compute it here based on object type, sent 
https://github.com/apache/beam/pull/5390. 
   Another possibility to guarantee consistent behavior between Python 2 and 3 
would be to set `__hash__ = None` if we can infer that a class is obviously 
non-hashable.  

----------------------------------------------------------------
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: 102666)
    Time Spent: 18.5h  (was: 18h 20m)

> 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: Robbe
>            Priority: Major
>             Fix For: Not applicable
>
>          Time Spent: 18.5h
>  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