Uploaded image for project: 'Beam'
  1. Beam
  2. BEAM-1251 Python 3 Support
  3. BEAM-5615

Several tests fail on Python 3 with TypeError: 'cmp' is an invalid keyword argument for this function

    XMLWordPrintableJSON

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Not applicable
    • Component/s: sdk-py-harness
    • Labels:
      None

      Description

      ERROR: test_top (apache_beam.transforms.combiners_test.CombineTest)
      ----------------------------------------------------------------------
      Traceback (most recent call last):
      File "/usr/local/google/home/valentyn/projects/beam/clean_head/beam/sdks/python/apache_beam/transforms/combiners_test.py", line 89, in test_top
      names) # Note parameter passed to comparator.
      File "/usr/local/google/home/valentyn/projects/beam/clean_head/beam/sdks/python/apache_beam/pvalue.py", line 111, in _or_
      return self.pipeline.apply(ptransform, self)
      File "/usr/local/google/home/valentyn/projects/beam/clean_head/beam/sdks/python/apache_beam/pipeline.py", line 467, in apply
      label or transform.label)
      File "/usr/local/google/home/valentyn/projects/beam/clean_head/beam/sdks/python/apache_beam/pipeline.py", line 477, in apply
      return self.apply(transform, pvalueish)
      File "/usr/local/google/home/valentyn/projects/beam/clean_head/beam/sdks/python/apache_beam/pipeline.py", line 513, in apply
      pvalueish_result = self.runner.apply(transform, pvalueish)
      File "/usr/local/google/home/valentyn/projects/beam/clean_head/beam/sdks/python/apache_beam/runners/runner.py", line 193, in apply
      return m(transform, input)
      File "/usr/local/google/home/valentyn/projects/beam/clean_head/beam/sdks/python/apache_beam/runners/runner.py", line 199, in apply_PTransform
      return transform.expand(input)
      File "/usr/local/google/home/valentyn/projects/beam/clean_head/beam/sdks/python/apache_beam/transforms/ptransform.py", line 759, in expand
      return self._fn(pcoll, *args, **kwargs)
      File "/usr/local/google/home/valentyn/projects/beam/clean_head/beam/sdks/python/apache_beam/transforms/combiners.py", line 185, in Of
      TopCombineFn(n, compare, key, reverse), *args, **kwargs)
      File "/usr/local/google/home/valentyn/projects/beam/clean_head/beam/sdks/python/apache_beam/pvalue.py", line 111, in _or_
      return self.pipeline.apply(ptransform, self)
      File "/usr/local/google/home/valentyn/projects/beam/clean_head/beam/sdks/python/apache_beam/pipeline.py", line 513, in apply
      pvalueish_result = self.runner.apply(transform, pvalueish)
      File "/usr/local/google/home/valentyn/projects/beam/clean_head/beam/sdks/python/apache_beam/runners/runner.py", line 193, in apply
      return m(transform, input)
      File "/usr/local/google/home/valentyn/projects/beam/clean_head/beam/sdks/python/apache_beam/runners/runner.py", line 199, in apply_PTransform
      return transform.expand(input)
      File "/usr/local/google/home/valentyn/projects/beam/clean_head/beam/sdks/python/apache_beam/transforms/core.py", line 1251, in expand
      default_value = combine_fn.apply([], *self.args, **self.kwargs)
      File "/usr/local/google/home/valentyn/projects/beam/clean_head/beam/sdks/python/apache_beam/transforms/core.py", line 623, in apply
      *args, **kwargs)
      File "/usr/local/google/home/valentyn/projects/beam/clean_head/beam/sdks/python/apache_beam/transforms/combiners.py", line 362, in extract_output
      self._sort_buffer(buffer, lt)
      File "/usr/local/google/home/valentyn/projects/beam/clean_head/beam/sdks/python/apache_beam/transforms/combiners.py", line 295, in _sort_buffer
      key=self._key_fn)
      TypeError: 'cmp' is an invalid keyword argument for this function

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                tvalentyn Valentyn Tymofieiev
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 3.5h
                  3.5h