Skip to content

Commit

Permalink
Removing Depreciation warning when using pipeline.options (#28774)
Browse files Browse the repository at this point in the history
Co-authored-by: [email protected] <India@wc2019>
  • Loading branch information
aku019 and [email protected] authored Oct 2, 2023
1 parent 11e2bae commit a7bf594
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 21 deletions.
4 changes: 0 additions & 4 deletions sdks/python/apache_beam/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,10 +235,6 @@ def __init__(self, runner=None, options=None, argv=None):


@property # type: ignore[misc] # decorated property not supported
@deprecated(
since='First stable release',
extra_message='References to <pipeline>.options'
' will not be supported')
def options(self):
# type: () -> PipelineOptions
return self._options
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
# pytype: skip-file

import logging
import warnings
from datetime import timedelta
from typing import Dict
from typing import List
Expand Down Expand Up @@ -496,11 +495,6 @@ def cleanup(
dcm = self.pipelines.pop(p, None)
if dcm:
dcm.pipelines.remove(p)
warnings.filterwarnings(
'ignore',
'options is deprecated since First stable release. References to '
'<pipeline>.options will not be supported',
category=DeprecationWarning)
p_flink_options = p.options.view_as(FlinkRunnerOptions)
p_flink_options.flink_master = '[auto]'
p_flink_options.flink_version = None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import logging
import os
import tempfile
import warnings
from collections.abc import Iterable
from pathlib import PurePath

Expand Down Expand Up @@ -374,11 +373,6 @@ def get_cache_manager(self, pipeline, create_if_absent=False):
given pipeline. If the pipeline is absent from the environment while
create_if_absent is True, creates and returns a new file based cache
manager for the pipeline."""
warnings.filterwarnings(
'ignore',
'options is deprecated since First stable release. References to '
'<pipeline>.options will not be supported',
category=DeprecationWarning)

cache_manager = self._cache_managers.get(str(id(pipeline)), None)
pipeline_runner = detect_pipeline_runner(pipeline)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -448,11 +448,6 @@ def record(self, pcolls, max_n, max_duration):
# incomplete.
self._clear()

warnings.filterwarnings(
'ignore',
'options is deprecated since First stable release. References to '
'<pipeline>.options will not be supported',
category=DeprecationWarning)
cache_path = ie.current_env().options.cache_root
is_remote_run = cache_path and ie.current_env(
).options.cache_root.startswith('gs://')
Expand Down

0 comments on commit a7bf594

Please sign in to comment.