Repository: incubator-beam
Updated Branches:
  refs/heads/python-sdk 90004a09e -> fd27f6848


Import Native* in iobase for backwards compatibility.


Project: http://git-wip-us.apache.org/repos/asf/incubator-beam/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-beam/commit/893fa2d4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-beam/tree/893fa2d4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-beam/diff/893fa2d4

Branch: refs/heads/python-sdk
Commit: 893fa2d4b531e23e41f98f817f45cd11e49c200c
Parents: 60e271b
Author: Robert Bradshaw <rober...@google.com>
Authored: Thu Oct 6 17:57:18 2016 -0700
Committer: Robert Bradshaw <rober...@google.com>
Committed: Mon Oct 10 10:30:00 2016 -0700

----------------------------------------------------------------------
 sdks/python/apache_beam/io/bigquery.py                      | 1 -
 sdks/python/apache_beam/io/fileio_test.py                   | 1 -
 sdks/python/apache_beam/io/iobase.py                        | 7 +++++--
 sdks/python/apache_beam/io/pubsub.py                        | 1 -
 .../python/apache_beam/runners/dataflow/native_io/iobase.py | 9 ---------
 sdks/python/apache_beam/runners/direct_runner.py            | 6 +++---
 6 files changed, 8 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/893fa2d4/sdks/python/apache_beam/io/bigquery.py
----------------------------------------------------------------------
diff --git a/sdks/python/apache_beam/io/bigquery.py 
b/sdks/python/apache_beam/io/bigquery.py
index 60d85df..4eecaa5 100644
--- a/sdks/python/apache_beam/io/bigquery.py
+++ b/sdks/python/apache_beam/io/bigquery.py
@@ -116,7 +116,6 @@ from apache_beam import coders
 from apache_beam.internal import auth
 from apache_beam.internal.json_value import from_json_value
 from apache_beam.internal.json_value import to_json_value
-from apache_beam.io import iobase
 from apache_beam.runners.dataflow.native_io import iobase as dataflow_io
 from apache_beam.utils import retry
 from apache_beam.utils.options import GoogleCloudOptions

http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/893fa2d4/sdks/python/apache_beam/io/fileio_test.py
----------------------------------------------------------------------
diff --git a/sdks/python/apache_beam/io/fileio_test.py 
b/sdks/python/apache_beam/io/fileio_test.py
index 77d6c45..b518b97 100644
--- a/sdks/python/apache_beam/io/fileio_test.py
+++ b/sdks/python/apache_beam/io/fileio_test.py
@@ -29,7 +29,6 @@ import zlib
 import apache_beam as beam
 from apache_beam import coders
 from apache_beam.io import fileio
-from apache_beam.io import iobase
 from apache_beam.runners.dataflow.native_io import iobase as dataflow_io
 
 # TODO: Add tests for file patterns (ie not just individual files) for both

http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/893fa2d4/sdks/python/apache_beam/io/iobase.py
----------------------------------------------------------------------
diff --git a/sdks/python/apache_beam/io/iobase.py 
b/sdks/python/apache_beam/io/iobase.py
index ac20732..8239e26 100644
--- a/sdks/python/apache_beam/io/iobase.py
+++ b/sdks/python/apache_beam/io/iobase.py
@@ -43,8 +43,6 @@ from apache_beam.transforms import core
 from apache_beam.transforms import ptransform
 from apache_beam.transforms import window
 
-#from apache_beam.runners.dataflow.native_io.iobase import *
-
 
 # Encapsulates information about a bundle of a source generated when method
 # BoundedSource.split() is invoked.
@@ -813,3 +811,8 @@ class _RoundRobinKeyFn(core.DoFn):
     if self.counter >= self.count:
       self.counter -= self.count
     yield self.counter, context.element
+
+
+# For backwards compatibility.
+# pylint: disable=wrong-import-position
+from apache_beam.runners.dataflow.native_io.iobase import *

http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/893fa2d4/sdks/python/apache_beam/io/pubsub.py
----------------------------------------------------------------------
diff --git a/sdks/python/apache_beam/io/pubsub.py 
b/sdks/python/apache_beam/io/pubsub.py
index 1f5989a..da81742 100644
--- a/sdks/python/apache_beam/io/pubsub.py
+++ b/sdks/python/apache_beam/io/pubsub.py
@@ -23,7 +23,6 @@ pipelines, during remote execution.
 from __future__ import absolute_import
 
 from apache_beam import coders
-from apache_beam.io import iobase
 from apache_beam.runners.dataflow.native_io import iobase as dataflow_io
 
 

http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/893fa2d4/sdks/python/apache_beam/runners/dataflow/native_io/iobase.py
----------------------------------------------------------------------
diff --git a/sdks/python/apache_beam/runners/dataflow/native_io/iobase.py 
b/sdks/python/apache_beam/runners/dataflow/native_io/iobase.py
index bccca9f..9621f4c 100644
--- a/sdks/python/apache_beam/runners/dataflow/native_io/iobase.py
+++ b/sdks/python/apache_beam/runners/dataflow/native_io/iobase.py
@@ -18,19 +18,10 @@
 """Dataflow native sources and sinks.
 """
 
-from collections import namedtuple
-
 import logging
-import random
-import uuid
 
 from apache_beam import pvalue
-from apache_beam.coders import PickleCoder
-from apache_beam.pvalue import AsIter
-from apache_beam.pvalue import AsSingleton
-from apache_beam.transforms import core
 from apache_beam.transforms import ptransform
-from apache_beam.transforms import window
 
 
 def _dict_printable_fields(dict_object, skip_fields):

http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/893fa2d4/sdks/python/apache_beam/runners/direct_runner.py
----------------------------------------------------------------------
diff --git a/sdks/python/apache_beam/runners/direct_runner.py 
b/sdks/python/apache_beam/runners/direct_runner.py
index 9eb587c..656cc91 100644
--- a/sdks/python/apache_beam/runners/direct_runner.py
+++ b/sdks/python/apache_beam/runners/direct_runner.py
@@ -242,7 +242,7 @@ class DirectPipelineRunner(PipelineRunner):
           transform_node.full_label] += len(read_result)
       self._cache.cache_output(transform_node, read_result)
 
-    # pylint: disable=import-at-top
+    # pylint: disable=wrong-import-position
     from apache_beam.io import iobase
 
     if isinstance(source, iobase.BoundedSource):
@@ -259,9 +259,9 @@ class DirectPipelineRunner(PipelineRunner):
   def run__NativeWrite(self, transform_node):
     sink = transform_node.transform.sink
 
-    # pylint: disable=import-at-top
+    # pylint: disable=wrong-import-position
     from apache_beam.io import fileio
-    
+
     if isinstance(sink, fileio.NativeTextFileSink):
       assert sink.num_shards in (0, 1)
       if sink.shard_name_template:

Reply via email to