You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "Valentyn Tymofieiev (Jira)" <ji...@apache.org> on 2021/11/17 23:57:00 UTC

[jira] [Created] (BEAM-13272) apache_beam.pipeline_test.DoFnTest.test_incomparable_default fails on Python 3.9

Valentyn Tymofieiev created BEAM-13272:
------------------------------------------

             Summary: apache_beam.pipeline_test.DoFnTest.test_incomparable_default fails on Python 3.9
                 Key: BEAM-13272
                 URL: https://issues.apache.org/jira/browse/BEAM-13272
             Project: Beam
          Issue Type: Sub-task
          Components: sdk-py-core
            Reporter: Valentyn Tymofieiev


{noformat}
Error Message
RuntimeError
Stacktrace
self = <apache_beam.pipeline_test.DoFnTest testMethod=test_incomparable_default>

    def test_incomparable_default(self):
      class IncomparableType(object):
        def __eq__(self, other):
          raise RuntimeError()
    
        def __ne__(self, other):
          raise RuntimeError()
    
        def __hash__(self):
          raise RuntimeError()
    
      # Ensure that we don't use default values in a context where they must be
      # comparable (see BEAM-8301).
      with TestPipeline() as pipeline:
        pcoll = (
            pipeline
            | beam.Create([None])
            | Map(lambda e, x=IncomparableType(): (e, type(x).__name__)))
>       assert_that(pcoll, equal_to([(None, 'IncomparableType')]))

apache_beam/pipeline_test.py:816: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
apache_beam/pipeline.py:596: in __exit__
    self.result = self.run()
apache_beam/testing/test_pipeline.py:112: in run
    result = super().run(
apache_beam/pipeline.py:546: in run
    return Pipeline.from_runner_api(
apache_beam/pipeline.py:573: in run
    return self.runner.run_pipeline(self, self._options)
apache_beam/runners/direct/direct_runner.py:131: in run_pipeline
    return runner.run_pipeline(pipeline, options)
apache_beam/runners/portability/fn_api_runner/fn_runner.py:195: in run_pipeline
    self._latest_run_result = self.run_via_runner_api(
apache_beam/runners/portability/fn_api_runner/fn_runner.py:206: in run_via_runner_api
    return self.run_stages(stage_context, stages)
apache_beam/runners/portability/fn_api_runner/fn_runner.py:384: in run_stages
    stage_results = self._run_stage(
apache_beam/runners/portability/fn_api_runner/fn_runner.py:646: in _run_stage
    self._run_bundle(
apache_beam/runners/portability/fn_api_runner/fn_runner.py:769: in _run_bundle
    result, splits = bundle_manager.process_bundle(
apache_beam/runners/portability/fn_api_runner/fn_runner.py:1080: in process_bundle
    result_future = self._worker_handler.control_conn.push(process_bundle_req)
apache_beam/runners/portability/fn_api_runner/worker_handlers.py:378: in push
    response = self.worker.do_instruction(request)
apache_beam/runners/worker/sdk_worker.py:580: in do_instruction
    return getattr(self, request_type)(
apache_beam/runners/worker/sdk_worker.py:611: in process_bundle
    bundle_processor = self.bundle_processor_cache.get(
apache_beam/runners/worker/sdk_worker.py:441: in get
    processor = bundle_processor.BundleProcessor(
apache_beam/runners/worker/bundle_processor.py:865: in __init__
    op.setup()
apache_beam/runners/worker/operations.py:686: in setup
    self.dofn_runner = common.DoFnRunner(
apache_beam/runners/common.py:1185: in __init__
    self.do_fn_invoker = DoFnInvoker.create_invoker(
apache_beam/runners/common.py:423: in create_invoker
    return PerWindowInvoker(
apache_beam/runners/common.py:561: in __init__
    (core.DoFn.WindowParam in default_arg_values) or
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <apache_beam.pipeline_test.IncomparableType object at 0x7f64877aaaf0>
other = WindowParam

    def __eq__(self, other):
>     raise RuntimeError()
E     RuntimeError

apache_beam/pipeline_test.py:801: RuntimeError
{noformat}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)