You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by al...@apache.org on 2017/06/27 19:29:13 UTC

[1/2] beam git commit: Use installed distribution name for sdk name

Repository: beam
Updated Branches:
  refs/heads/master 9dc40d637 -> 2365e7127


Use installed distribution name for sdk name


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

Branch: refs/heads/master
Commit: d6855ac6797b8f83bf57b6ccdaf20bbf3db316c6
Parents: 9dc40d6
Author: Ahmet Altay <al...@google.com>
Authored: Mon Jun 26 23:22:36 2017 -0700
Committer: Ahmet Altay <al...@google.com>
Committed: Tue Jun 27 12:29:00 2017 -0700

----------------------------------------------------------------------
 .../apache_beam/runners/dataflow/internal/dependency.py      | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/beam/blob/d6855ac6/sdks/python/apache_beam/runners/dataflow/internal/dependency.py
----------------------------------------------------------------------
diff --git a/sdks/python/apache_beam/runners/dataflow/internal/dependency.py b/sdks/python/apache_beam/runners/dataflow/internal/dependency.py
index 6d4a703..03e1794 100644
--- a/sdks/python/apache_beam/runners/dataflow/internal/dependency.py
+++ b/sdks/python/apache_beam/runners/dataflow/internal/dependency.py
@@ -500,11 +500,13 @@ def get_sdk_name_and_version():
   """For internal use only; no backwards-compatibility guarantees.
 
   Returns name and version of SDK reported to Google Cloud Dataflow."""
-  # TODO(ccy): Make this check cleaner.
+  import pkg_resources as pkg
   container_version = get_required_container_version()
-  if container_version == BEAM_CONTAINER_VERSION:
+  try:
+    pkg.get_distribution(GOOGLE_PACKAGE_NAME)
+    return ('Google Cloud Dataflow SDK for Python', container_version)
+  except pkg.DistributionNotFound:
     return ('Apache Beam SDK for Python', beam_version.__version__)
-  return ('Google Cloud Dataflow SDK for Python', container_version)
 
 
 def get_sdk_package_name():


[2/2] beam git commit: This closes #3448

Posted by al...@apache.org.
This closes #3448


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

Branch: refs/heads/master
Commit: 2365e7127cd8c938d9a668af790e697cfe944c1b
Parents: 9dc40d6 d6855ac
Author: Ahmet Altay <al...@google.com>
Authored: Tue Jun 27 12:29:03 2017 -0700
Committer: Ahmet Altay <al...@google.com>
Committed: Tue Jun 27 12:29:03 2017 -0700

----------------------------------------------------------------------
 .../apache_beam/runners/dataflow/internal/dependency.py      | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------