[
https://issues.apache.org/jira/browse/BEAM-4003?focusedWorklogId=119016&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-119016
]
ASF GitHub Bot logged work on BEAM-4003:
----------------------------------------
Author: ASF GitHub Bot
Created on: 04/Jul/18 10:10
Start Date: 04/Jul/18 10:10
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_r200076690
##########
File path: sdks/python/apache_beam/runners/direct/executor.py
##########
@@ -22,19 +22,24 @@
import collections
import itertools
import logging
-import Queue
+import queue
import sys
import threading
import traceback
+from builtins import object
+from builtins import range
from weakref import WeakValueDictionary
-import six
+from future import standard_library
+from future.utils import raise_
from apache_beam.metrics.execution import MetricsContainer
from apache_beam.runners.worker import statesampler
from apache_beam.transforms import sideinputs
from apache_beam.utils import counters
+standard_library.install_aliases()
Review comment:
pylint errors on placing `install_aliases()` above the imports. That's the
reasoning for this location.
I tested functionality of this placement and this order works as well:
test script (Python2):
Without `install_aliases()`:
```
>>> import sys
>>> sys.intern
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'intern'
```
With `install_aliases()` after import sys
```
>>> import sys
>>> from future import standard_library
>>> standard_library.install_aliases()
>>> sys.intern
<built-in function intern>
```
----------------------------------------------------------------
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: 119016)
Time Spent: 6h (was: 5h 50m)
> 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: 6h
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)