[
https://issues.apache.org/jira/browse/BEAM-4003?focusedWorklogId=119408&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-119408
]
ASF GitHub Bot logged work on BEAM-4003:
----------------------------------------
Author: ASF GitHub Bot
Created on: 05/Jul/18 15:31
Start Date: 05/Jul/18 15:31
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_r200396579
##########
File path: sdks/python/apache_beam/runners/dataflow/internal/apiclient.py
##########
@@ -28,12 +31,13 @@
import tempfile
import time
from datetime import datetime
-from StringIO import StringIO
+from io import BytesIO
import pkg_resources
from apitools.base.py import encoding
from apitools.base.py import exceptions
-import six
+
+from future import standard_library
Review comment:
OK, I'll remove the install_aliases caused by `io`. However regarding the
order, it seems that install_aliases doesn't need to be called before the
imports (copied from
[here](https://github.com/apache/beam/pull/5373#discussion_r200076690)):
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>
```
*Based on [documented effect of aliased
imports](http://python-future.org/standard_library_imports.html#aliased-imports)
----------------------------------------------------------------
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: 119408)
Time Spent: 7.5h (was: 7h 20m)
> 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: 7.5h
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)