[ 
https://issues.apache.org/jira/browse/BEAM-5462?focusedWorklogId=167135&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-167135
 ]

ASF GitHub Bot logged work on BEAM-5462:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 17/Nov/18 00:08
            Start Date: 17/Nov/18 00:08
    Worklog Time Spent: 10m 
      Work Description: udim commented on a change in pull request #6930: 
[BEAM-5462] get rid of <pipeline>.options deprecation warnings in tests
URL: https://github.com/apache/beam/pull/6930#discussion_r234382228
 
 

 ##########
 File path: sdks/python/apache_beam/io/gcp/pubsub_test.py
 ##########
 @@ -109,8 +110,9 @@ def test_repr(self):
 class TestReadFromPubSubOverride(unittest.TestCase):
 
   def test_expand_with_topic(self):
-    p = TestPipeline()
-    p.options.view_as(StandardOptions).streaming = True
+    options = PipelineOptions([])
+    p = TestPipeline(options=options)
+    options.view_as(StandardOptions).streaming = True
 
 Review comment:
   Technically this works, but setting `streaming` should happen before passing 
`options` to TestPipeline, since TestPipeline might make a copy of `options`, 
already evaluated `streaming` in the constructor, etc.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 167135)
    Time Spent: 3.5h  (was: 3h 20m)

> get rid of <pipeline>.options deprecation warnings in tests
> -----------------------------------------------------------
>
>                 Key: BEAM-5462
>                 URL: https://issues.apache.org/jira/browse/BEAM-5462
>             Project: Beam
>          Issue Type: Bug
>          Components: sdk-py-core
>            Reporter: Udi Meiri
>            Assignee: Heejong Lee
>            Priority: Minor
>          Time Spent: 3.5h
>  Remaining Estimate: 0h
>
> Messages look like:
> {{/usr/local/google/home/ehudm/src/beam/sdks/python/apache_beam/runners/direct/direct_runner.py:360:
>  DeprecationWarning: options is deprecated since First stable release. 
> References to <pipeline>.options will not be supported}}
> {{pipeline.replace_all(_get_transform_overrides(pipeline.options))}}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to