Skip to content

Commit

Permalink
fix(sdk): fixes dsl.ContainerOp deprecation warning not shown (#4658)
Browse files Browse the repository at this point in the history
* change dsl.ContainerOp warning to FutureWarning

* fix tests
  • Loading branch information
munagekar committed Oct 24, 2020
1 parent d7793af commit c52a81c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sdk/python/kfp/dsl/_container_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -1025,7 +1025,7 @@ def __init__(
" The components can be created manually (or, in case of python, using kfp.components.create_component_from_func or func_to_container_op)"
" and then loaded using kfp.components.load_component_from_file, load_component_from_uri or load_component_from_text: "
"https://kubeflow-pipelines.readthedocs.io/en/latest/source/kfp.components.html#kfp.components.load_component_from_file",
category=DeprecationWarning,
category=FutureWarning,
)

self.attrs_with_pipelineparams = BaseOp.attrs_with_pipelineparams + ['_container', 'artifact_arguments', '_parameter_arguments'] #Copying the BaseOp class variable!
Expand Down
2 changes: 1 addition & 1 deletion sdk/python/tests/dsl/component_bridge_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ def test_reusable_component_warnings(self):
deprecation_messages = list(str(message) for message in warning_messages if message.category == DeprecationWarning)
self.assertListEqual(deprecation_messages, [])

with self.assertWarnsRegex(DeprecationWarning, expected_regex='reusable'):
with self.assertWarnsRegex(FutureWarning, expected_regex='reusable'):
kfp.dsl.ContainerOp(name='name', image='image')

def test_prevent_passing_container_op_as_argument(self):
Expand Down

0 comments on commit c52a81c

Please sign in to comment.