[ https://issues.apache.org/jira/browse/BEAM-3999?focusedWorklogId=102757&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-102757 ]
ASF GitHub Bot logged work on BEAM-3999: ---------------------------------------- Author: ASF GitHub Bot Created on: 17/May/18 02:00 Start Date: 17/May/18 02:00 Worklog Time Spent: 10m Work Description: tvalentyn commented on a change in pull request #5334: [BEAM-3999] Futurize internal subpackage URL: https://github.com/apache/beam/pull/5334#discussion_r188820867 ########## File path: sdks/python/apache_beam/internal/util.py ########## @@ -20,9 +20,13 @@ For internal use only. No backwards compatibility guarantees. """ +from __future__ import absolute_import + import logging import threading import weakref +from builtins import next Review comment: I'd like to understand the reason for adding `from builtins import next`. Is it done by a conversion tool because we have an occurrence of `next(v_iter)` in the file, and the tool cannot infer whether or not v_iter implements a custom iterator? If yes: will such changes be required by linter? Is my understanding correct that as long as `v_iter.__class__` does not implement a custom iterator (and it is not, in our case), the code without the import is still equivalent in Python 2 and Python 3? ---------------------------------------------------------------- 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: 102757) Time Spent: 1h (was: 50m) > Futurize and fix python 2 compatibility for internal subpackage > --------------------------------------------------------------- > > Key: BEAM-3999 > URL: https://issues.apache.org/jira/browse/BEAM-3999 > Project: Beam > Issue Type: Sub-task > Components: sdk-py-core > Reporter: Robbe > Assignee: Robbe > Priority: Major > Time Spent: 1h > Remaining Estimate: 0h > -- This message was sent by Atlassian JIRA (v7.6.3#76005)