Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing Depreciation warning when using pipeline.options #28774

Merged
merged 4 commits into from
Oct 2, 2023
Merged
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
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