diff --git a/.github/trigger_files/beam_PostCommit_XVR_Flink.json b/.github/trigger_files/beam_PostCommit_XVR_Flink.json index c4edaa85a89d..e3d6056a5de9 100644 --- a/.github/trigger_files/beam_PostCommit_XVR_Flink.json +++ b/.github/trigger_files/beam_PostCommit_XVR_Flink.json @@ -1,3 +1,4 @@ { - "comment": "Modify this file in a trivial way to cause this test suite to run" + "comment": "Modify this file in a trivial way to cause this test suite to run", + "modification": 1 } diff --git a/sdks/java/extensions/python/src/main/resources/org/apache/beam/sdk/extensions/python/bootstrap_beam_venv.py b/sdks/java/extensions/python/src/main/resources/org/apache/beam/sdk/extensions/python/bootstrap_beam_venv.py index 3d4a519a96f9..ef5a03195416 100644 --- a/sdks/java/extensions/python/src/main/resources/org/apache/beam/sdk/extensions/python/bootstrap_beam_venv.py +++ b/sdks/java/extensions/python/src/main/resources/org/apache/beam/sdk/extensions/python/bootstrap_beam_venv.py @@ -30,7 +30,6 @@ import shutil import subprocess import sys -from pkg_resources import parse_version def main(): @@ -64,13 +63,13 @@ def main(): info = json.load( urllib.request.urlopen("https://pypi.org/pypi/apache_beam/json")) - def maybe_strict_version(s): - try: - return parse_version(s) - except: - return parse_version('0.0') + def released_version(s): + if s.replace('.', '').isdecimal(): + return [int(t) for t in s.split('.')] + else: + return [0] - beam_version = max(info['releases'], key=maybe_strict_version) + beam_version = max(info['releases'], key=released_version) beam_package = 'apache_beam[gcp,aws,azure,dataframe]==' + beam_version elif (os.path.exists(options.beam_version) or options.beam_version.startswith('http://')