Skip to content
Open
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -1262,8 +1262,10 @@ def _verify_interpreter_version_is_supported(pipeline_options):
return

raise Exception(
'Dataflow runner currently supports Python versions %s, got %s.\n'
'Dataflow runner currently supports Python versions %s, got %s.%s.\n'
'To ignore this requirement and start a job '
'using an unsupported version of Python interpreter, pass '
'--experiment use_unsupported_python_version pipeline option.' %
(_PYTHON_VERSIONS_SUPPORTED_BY_DATAFLOW, sys.version))
'--experiment use_unsupported_python_version pipeline option.' % (
_PYTHON_VERSIONS_SUPPORTED_BY_DATAFLOW,
sys.version_info[0],
sys.version_info[1]))
Original file line number Diff line number Diff line change
Expand Up @@ -1030,9 +1030,12 @@ def test_experiment_use_multiple_sdk_containers(self):
self.assertNotIn(
'use_multiple_sdk_containers', environment.proto.experiments)

# Note: We mock Python to 3.11 here. Keep this mocked version aligned with a
# version in _PYTHON_VERSIONS_SUPPORTED_BY_DATAFLOW to prevent test failures
# on release (non-dev) builds.
@mock.patch(
'apache_beam.runners.dataflow.internal.apiclient.sys.version_info',
(3, 9))
(3, 11))
def test_get_python_sdk_name(self):
pipeline_options = PipelineOptions([
'--project',
Expand All @@ -1051,7 +1054,7 @@ def test_get_python_sdk_name(self):
'1',
FAKE_PIPELINE_URL)
self.assertEqual(
'Apache Beam Python 3.9 SDK', environment._get_python_sdk_name())
'Apache Beam Python 3.11 SDK', environment._get_python_sdk_name())

@mock.patch(
'apache_beam.runners.dataflow.internal.apiclient.sys.version_info',
Expand Down
Loading