[ 
https://issues.apache.org/jira/browse/BEAM-5663?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16652621#comment-16652621
 ] 

Valentyn Tymofieiev edited comment on BEAM-5663 at 10/16/18 11:14 PM:
----------------------------------------------------------------------

Thanks, [~mauzhang]. I looked at the logs, and also verifed myself that some 
tests that pass on Python 3.5 on Jenkins, fail in other versions of the 
interpreter. FYI [~matthiasml6] [~RobbeSneyders] [~splovyt] [~Juta].

 For example:

python ./setup.py test -s 
apache_beam.typehints.typed_pipeline_test.SideInputTest.test_basic_side_input_hint
  fails on Python 3.4 with:

======================================================================
ERROR: test_basic_side_input_hint 
(apache_beam.typehints.typed_pipeline_test.SideInputTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/beam/sdks/python/apache_beam/typehints/typed_pipeline_test.py", line 
173, in test_basic_side_input_hint
    self._run_repeat_test(repeat)
  File "/beam/sdks/python/apache_beam/typehints/typed_pipeline_test.py", line 
144, in _run_repeat_test
    self._run_repeat_test_good(repeat)
  File "/beam/sdks/python/apache_beam/options/pipeline_options.py", line 803, 
in wrapper
    f(*args, **kwargs)
  File "/beam/sdks/python/apache_beam/typehints/typed_pipeline_test.py", line 
150, in _run_repeat_test_good
    result = ['a', 'bb', 'c'] | beam.Map(repeat, 3)
  File "/beam/sdks/python/apache_beam/transforms/ptransform.py", line 496, in 
__ror__
    p.run().wait_until_finish()
  File "/beam/sdks/python/apache_beam/pipeline.py", line 403, in run
    self.to_runner_api(), self.runner, self._options).run(False)
  File "/beam/sdks/python/apache_beam/pipeline.py", line 416, in run
    return self.runner.run_pipeline(self)
  File "/beam/sdks/python/apache_beam/runners/direct/direct_runner.py", line 
139, in run_pipeline
    return runner.run_pipeline(pipeline)
  File "/beam/sdks/python/apache_beam/runners/portability/fn_api_runner.py", 
line 231, in run_pipeline
    return self.run_via_runner_api(pipeline.to_runner_api())
  File "/beam/sdks/python/apache_beam/runners/portability/fn_api_runner.py", 
line 234, in run_via_runner_api
    return self.run_stages(*self.create_stages(pipeline_proto))
  File "/beam/sdks/python/apache_beam/runners/portability/fn_api_runner.py", 
line 967, in create_stages
    pcoll.coder_id = coders.get_id(coder)
  File "/beam/sdks/python/apache_beam/runners/pipeline_context.py", line 79, in 
get_id
    self._id_to_proto[id] = obj.to_runner_api(self._pipeline_context)
  File "/beam/sdks/python/apache_beam/coders/coders.py", line 259, in 
to_runner_api
    component_coder_ids=[context.coders.get_id(c) for c in components])
  File "/beam/sdks/python/apache_beam/coders/coders.py", line 259, in <listcomp>
    component_coder_ids=[context.coders.get_id(c) for c in components])
  File "/beam/sdks/python/apache_beam/runners/pipeline_context.py", line 79, in 
get_id
    self._id_to_proto[id] = obj.to_runner_api(self._pipeline_context)
  File "/beam/sdks/python/apache_beam/coders/coders.py", line 250, in 
to_runner_api
    urn, typed_param, components = self.to_runner_api_parameter(context)
  File "/beam/sdks/python/apache_beam/coders/coders.py", line 276, in 
to_runner_api_parameter
    google.protobuf.wrappers_pb2.BytesValue(value=serialize_coder(self)),
  File "/beam/sdks/python/apache_beam/coders/coders.py", line 67, in 
serialize_coder
    pickler.dumps(coder))
TypeError: unsupported operand type(s) for %: 'bytes' and 'tuple'



was (Author: tvalentyn):
Thanks, [~mauzhang]. I looked at the logs, and also verifed myself that some 
tests that pass on Python 3.5 on Jenkins, fail on Python 3.4. FYI 
[~matthiasml6] [~RobbeSneyders] [~splovyt] [~Juta].

 For example:

python ./setup.py test -s 
apache_beam.typehints.typed_pipeline_test.SideInputTest.test_basic_side_input_hint
  fails on Python 3.4 with:

======================================================================
ERROR: test_basic_side_input_hint 
(apache_beam.typehints.typed_pipeline_test.SideInputTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/beam/sdks/python/apache_beam/typehints/typed_pipeline_test.py", line 
173, in test_basic_side_input_hint
    self._run_repeat_test(repeat)
  File "/beam/sdks/python/apache_beam/typehints/typed_pipeline_test.py", line 
144, in _run_repeat_test
    self._run_repeat_test_good(repeat)
  File "/beam/sdks/python/apache_beam/options/pipeline_options.py", line 803, 
in wrapper
    f(*args, **kwargs)
  File "/beam/sdks/python/apache_beam/typehints/typed_pipeline_test.py", line 
150, in _run_repeat_test_good
    result = ['a', 'bb', 'c'] | beam.Map(repeat, 3)
  File "/beam/sdks/python/apache_beam/transforms/ptransform.py", line 496, in 
__ror__
    p.run().wait_until_finish()
  File "/beam/sdks/python/apache_beam/pipeline.py", line 403, in run
    self.to_runner_api(), self.runner, self._options).run(False)
  File "/beam/sdks/python/apache_beam/pipeline.py", line 416, in run
    return self.runner.run_pipeline(self)
  File "/beam/sdks/python/apache_beam/runners/direct/direct_runner.py", line 
139, in run_pipeline
    return runner.run_pipeline(pipeline)
  File "/beam/sdks/python/apache_beam/runners/portability/fn_api_runner.py", 
line 231, in run_pipeline
    return self.run_via_runner_api(pipeline.to_runner_api())
  File "/beam/sdks/python/apache_beam/runners/portability/fn_api_runner.py", 
line 234, in run_via_runner_api
    return self.run_stages(*self.create_stages(pipeline_proto))
  File "/beam/sdks/python/apache_beam/runners/portability/fn_api_runner.py", 
line 967, in create_stages
    pcoll.coder_id = coders.get_id(coder)
  File "/beam/sdks/python/apache_beam/runners/pipeline_context.py", line 79, in 
get_id
    self._id_to_proto[id] = obj.to_runner_api(self._pipeline_context)
  File "/beam/sdks/python/apache_beam/coders/coders.py", line 259, in 
to_runner_api
    component_coder_ids=[context.coders.get_id(c) for c in components])
  File "/beam/sdks/python/apache_beam/coders/coders.py", line 259, in <listcomp>
    component_coder_ids=[context.coders.get_id(c) for c in components])
  File "/beam/sdks/python/apache_beam/runners/pipeline_context.py", line 79, in 
get_id
    self._id_to_proto[id] = obj.to_runner_api(self._pipeline_context)
  File "/beam/sdks/python/apache_beam/coders/coders.py", line 250, in 
to_runner_api
    urn, typed_param, components = self.to_runner_api_parameter(context)
  File "/beam/sdks/python/apache_beam/coders/coders.py", line 276, in 
to_runner_api_parameter
    google.protobuf.wrappers_pb2.BytesValue(value=serialize_coder(self)),
  File "/beam/sdks/python/apache_beam/coders/coders.py", line 67, in 
serialize_coder
    pickler.dumps(coder))
TypeError: unsupported operand type(s) for %: 'bytes' and 'tuple'


> Add tox suites for various Python 3 versions
> --------------------------------------------
>
>                 Key: BEAM-5663
>                 URL: https://issues.apache.org/jira/browse/BEAM-5663
>             Project: Beam
>          Issue Type: Sub-task
>          Components: sdk-py-core
>            Reporter: Manu Zhang
>            Priority: Minor
>
> Currently, Python 3.5.2 is set up for Jenkins tests but we've seen test 
> failings across various Python 3 versions. It will be valuable to add tox 
> suites for Python 3.4, 3.5, 3.6 and 3.7



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

Reply via email to