[ https://issues.apache.org/jira/browse/BEAM-4003?focusedWorklogId=112154&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-112154 ]
ASF GitHub Bot logged work on BEAM-4003: ---------------------------------------- Author: ASF GitHub Bot Created on: 15/Jun/18 03:34 Start Date: 15/Jun/18 03:34 Worklog Time Spent: 10m Work Description: tvalentyn commented on a change in pull request #5373: [BEAM-4003] Futurize runners subpackage URL: https://github.com/apache/beam/pull/5373#discussion_r195550396 ########## File path: sdks/python/apache_beam/runners/direct/transform_evaluator.py ########## @@ -716,7 +717,7 @@ def process_element(self, element): def finish_bundle(self): bundles = [] bundle = None - for encoded_k, vs in self.gbk_items.iteritems(): + for encoded_k, vs in self.gbk_items.items(): Review comment: As we learned in https://github.com/apache/beam/pull/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. ---------------------------------------------------------------- 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: 112154) Time Spent: 1h 10m (was: 1h) > 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: 1h 10m > Remaining Estimate: 0h > -- This message was sent by Atlassian JIRA (v7.6.3#76005)