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

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

                Author: ASF GitHub Bot
            Created on: 17/Sep/18 15:43
            Start Date: 17/Sep/18 15:43
    Worklog Time Spent: 10m 
      Work Description: manuzhang closed pull request #6397: [BEAM-5317] Finish 
Python3 porting for options module
URL: https://github.com/apache/beam/pull/6397
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/sdks/python/apache_beam/options/pipeline_options.py 
b/sdks/python/apache_beam/options/pipeline_options.py
index 753d4cf20de..b75ed2ab5c3 100644
--- a/sdks/python/apache_beam/options/pipeline_options.py
+++ b/sdks/python/apache_beam/options/pipeline_options.py
@@ -217,7 +217,7 @@ def get_all_options(self, drop_default=False):
     result = vars(known_args)
 
     # Apply the overrides if any
-    for k in result.keys():
+    for k in list(result):
       if k in self._all_options:
         result[k] = self._all_options[k]
       if (drop_default and
diff --git a/sdks/python/apache_beam/options/pipeline_options_validator_test.py 
b/sdks/python/apache_beam/options/pipeline_options_validator_test.py
index c0582e2f7d1..9818422e2f6 100644
--- a/sdks/python/apache_beam/options/pipeline_options_validator_test.py
+++ b/sdks/python/apache_beam/options/pipeline_options_validator_test.py
@@ -311,7 +311,7 @@ def get_validator(matcher):
                  '--staging_location=gs://foo/bar',
                  '--temp_location=gs://foo/bar',]
       if matcher:
-        options.append('--on_success_matcher=' + matcher)
+        options.append('%s=%s' % ('--on_success_matcher', matcher.decode()))
 
       pipeline_options = PipelineOptions(options)
       runner = MockRunners.TestDataflowRunner()
@@ -322,7 +322,7 @@ def get_validator(matcher):
          'errors': []},
         {'on_success_matcher': pickler.dumps(AlwaysPassMatcher()),
          'errors': []},
-        {'on_success_matcher': 'abc',
+        {'on_success_matcher': b'abc',
          'errors': ['on_success_matcher']},
         {'on_success_matcher': pickler.dumps(object),
          'errors': ['on_success_matcher']},
diff --git a/sdks/python/apache_beam/testing/test_pipeline.py 
b/sdks/python/apache_beam/testing/test_pipeline.py
index 4e4c9282686..dc6044d9dc0 100644
--- a/sdks/python/apache_beam/testing/test_pipeline.py
+++ b/sdks/python/apache_beam/testing/test_pipeline.py
@@ -152,7 +152,7 @@ def get_full_options_as_args(self, **extra_opts):
       elif isinstance(v, bool) and v:
         options.append('--%s' % k)
       elif 'matcher' in k:
-        options.append('--%s=%s' % (k, pickler.dumps(v)))
+        options.append('--%s=%s' % (k, pickler.dumps(v).decode()))
       else:
         options.append('--%s=%s' % (k, v))
     return options
diff --git a/sdks/python/tox.ini b/sdks/python/tox.ini
index 3f0af18f865..c2eecb440cd 100644
--- a/sdks/python/tox.ini
+++ b/sdks/python/tox.ini
@@ -57,7 +57,7 @@ commands =
 setenv =
   BEAM_EXPERIMENTAL_PY3=1
 modules =
-  apache_beam.coders,apache_beam.tools,apache_beam.utils
+  apache_beam.coders,apache_beam.options,apache_beam.tools,apache_beam.utils
 commands =
   python --version
   pip --version


 

----------------------------------------------------------------
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:
us...@infra.apache.org


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

    Worklog Id:     (was: 144889)
    Time Spent: 3h 40m  (was: 3.5h)

> Finish Python 3 porting for options module
> ------------------------------------------
>
>                 Key: BEAM-5317
>                 URL: https://issues.apache.org/jira/browse/BEAM-5317
>             Project: Beam
>          Issue Type: Sub-task
>          Components: sdk-py-core
>            Reporter: Robbe
>            Assignee: Manu Zhang
>            Priority: Major
>          Time Spent: 3h 40m
>  Remaining Estimate: 0h
>




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

Reply via email to