[
https://issues.apache.org/jira/browse/BEAM-4003?focusedWorklogId=119011&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-119011
]
ASF GitHub Bot logged work on BEAM-4003:
----------------------------------------
Author: ASF GitHub Bot
Created on: 04/Jul/18 09:51
Start Date: 04/Jul/18 09:51
Worklog Time Spent: 10m
Work Description: Fematich commented on a change in pull request #5373:
[BEAM-4003] Futurize runners subpackage
URL: https://github.com/apache/beam/pull/5373#discussion_r200071447
##########
File path: sdks/python/apache_beam/runners/worker/bundle_processor.py
##########
@@ -103,7 +107,7 @@ def __init__(self, operation_name, step_name, consumers,
counter_factory,
# We must do this manually as we don't have a spec or spec.output_coders.
self.receivers = [
operations.ConsumerSet(self.counter_factory, self.step_name, 0,
- next(consumers.itervalues()),
+ next(itervalues(consumers)),
Review comment:
I used itervalues based on the feedback of @tvalentyn
[here](https://github.com/apache/beam/pull/5373#discussion_r195550396):
> As we learned in #5053, Cython can translate iteration through items()
without an intermediate object given a directive to interpret the code using
Python3 semantics. However when the code is not cythonized, I would prefer to
use future.util.iteritems() avoid impact on efficiency for Python 2. It's
probably ok to use items() in tests, or when it's clear that the collection is
small in size.
Similar to iteritems, I am using itervalues here to avoid efficiency losses
in Python2
----------------------------------------------------------------
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: 119011)
Time Spent: 5h 50m (was: 5h 40m)
> Futurize and fix python 2 compatibility for runners subpackage
> --------------------------------------------------------------
>
> Key: BEAM-4003
> URL: https://issues.apache.org/jira/browse/BEAM-4003
> Project: Beam
> Issue Type: Sub-task
> Components: sdk-py-core
> Reporter: Robbe
> Assignee: Matthias Feys
> Priority: Major
> Time Spent: 5h 50m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)