Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion sdks/python/apache_beam/utils/dependency.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
import glob
import logging
import os
import re
import shutil
import tempfile

Expand Down Expand Up @@ -431,7 +432,11 @@ def get_required_container_version():
version = pkg.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.
return '%s.%s.%s' % pkg.parse_version(version)._version.release
container_version = '%s.%s.%s' % pkg.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
except pkg.DistributionNotFound:
# This case covers Apache Beam end-to-end testing scenarios. All these tests
# will run with a special container version.
Expand Down