beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Work logged] (BEAM-5324) Finish Python 3 porting for unpackaged files
Date Tue, 18 Sep 2018 22:44:00 GMT


ASF GitHub Bot logged work on BEAM-5324:

                Author: ASF GitHub Bot
            Created on: 18/Sep/18 22:43
            Start Date: 18/Sep/18 22:43
    Worklog Time Spent: 10m 
      Work Description: RobbeSneyders commented on a change in pull request #6424: [BEAM-5324]
Partially port unpackaged modules to Python 3

 File path: sdks/python/apache_beam/runners/worker/
 @@ -496,7 +496,8 @@ def __init__(self, name_context, spec, counter_factory, state_sampler):
     fn, args, kwargs = pickler.loads(self.spec.combine_fn)[:3]
     self.combine_fn = curry_combine_fn(fn, args, kwargs)
     if (getattr(fn.add_input, 'im_func', None)
-        is core.CombineFn.add_input.__func__):
+        is getattr(core.CombineFn.add_input, '__func__',
 Review comment:
   On Python 2, getting a method from a class returns an unbound method, with a reference
to the wrapped function stored in `__func__`.
   On Pyhon 3, getting a method from a class returns the function itself.
   On Python 2.6+, `im_func` is also available as `__func__`, so we can change it to
   if (getattr(fn.add_input, '__func__', None)
       is is getattr(core.CombineFn.add_input, '__func__',
   if this is more clear.

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:

Issue Time Tracking

    Worklog Id:     (was: 145513)
    Time Spent: 40m  (was: 0.5h)

> Finish Python 3 porting for unpackaged files
> --------------------------------------------
>                 Key: BEAM-5324
>                 URL:
>             Project: Beam
>          Issue Type: Sub-task
>          Components: sdk-py-core
>            Reporter: Robbe
>            Assignee: Robbe
>            Priority: Major
>          Time Spent: 40m
>  Remaining Estimate: 0h

This message was sent by Atlassian JIRA

View raw message