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/12/20 00:16:57 UTC
[beam] branch master updated: [BEAM-3174] Don't parse the release
version just directly use the get_distribution version result
This is an automated email from the ASF dual-hosted git repository.
altay pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git
The following commit(s) were added to refs/heads/master by this push:
new 26c5acb [BEAM-3174] Don't parse the release version just directly use the get_distribution version result
26c5acb is described below
commit 26c5acb3cc82dac6db59de7e4c91bc4c5c558137
Author: Holden Karau <ho...@pigscanfly.ca>
AuthorDate: Tue Dec 19 19:16:53 2017 -0500
[BEAM-3174] Don't parse the release version just directly use the get_distribution version result
---
.../apache_beam/runners/dataflow/internal/dependency.py | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/sdks/python/apache_beam/runners/dataflow/internal/dependency.py b/sdks/python/apache_beam/runners/dataflow/internal/dependency.py
index 5b956e4..1fafd24 100644
--- a/sdks/python/apache_beam/runners/dataflow/internal/dependency.py
+++ b/sdks/python/apache_beam/runners/dataflow/internal/dependency.py
@@ -54,7 +54,6 @@ import functools
import glob
import logging
import os
-import re
import shutil
import sys
import tempfile
@@ -544,15 +543,7 @@ def _get_required_container_version(job_type=None):
"""
# TODO(silviuc): Handle apache-beam versions when we have official releases.
try:
- version = pkg_resources.get_distribution(GOOGLE_PACKAGE_NAME).version
- # We drop any pre/post parts of the version and we keep only the X.Y.Z
- # format. For instance the 0.3.0rc2 SDK version translates into 0.3.0.
- container_version = (
- '%s.%s.%s' % pkg_resources.parse_version(version)._version.release)
- # We do, however, keep the ".dev" suffix if it is present.
- if re.match(r'.*\.dev[0-9]*$', version):
- container_version += '.dev'
- return container_version
+ return pkg_resources.get_distribution(GOOGLE_PACKAGE_NAME).version
except pkg_resources.DistributionNotFound:
# This case covers Apache Beam end-to-end testing scenarios. All these tests
# will run with a special container version.
--
To stop receiving notification emails like this one, please contact
['"commits@beam.apache.org" <co...@beam.apache.org>'].