[ https://issues.apache.org/jira/browse/BEAM-5744?focusedWorklogId=154179&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-154179 ]
ASF GitHub Bot logged work on BEAM-5744: ---------------------------------------- Author: ASF GitHub Bot Created on: 15/Oct/18 00:10 Start Date: 15/Oct/18 00:10 Worklog Time Spent: 10m Work Description: aaltay closed pull request #6686: [BEAM-5744] Revert "[BEAM-5621] Fix unorderable types in python 3" URL: https://github.com/apache/beam/pull/6686 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/testing/util.py b/sdks/python/apache_beam/testing/util.py index a9b326cce36..23d58cb29d5 100644 --- a/sdks/python/apache_beam/testing/util.py +++ b/sdks/python/apache_beam/testing/util.py @@ -112,9 +112,8 @@ def equal_to(expected): expected = list(expected) def _equal(actual): - sorted_expected = sorted(expected, - key=lambda x: (hash(type(x)), type(x), x)) - sorted_actual = sorted(actual, key=lambda x: (hash(type(x)), type(x), x)) + sorted_expected = sorted(expected) + sorted_actual = sorted(actual) if sorted_expected != sorted_actual: raise BeamAssertException( 'Failed assert: %r == %r' % (sorted_expected, sorted_actual)) diff --git a/sdks/python/apache_beam/transforms/util.py b/sdks/python/apache_beam/transforms/util.py index 38839f57842..a6963604384 100644 --- a/sdks/python/apache_beam/transforms/util.py +++ b/sdks/python/apache_beam/transforms/util.py @@ -223,7 +223,7 @@ def __init__(self, if target_batch_duration_secs and target_batch_duration_secs <= 0: raise ValueError("target_batch_duration_secs (%s) must be positive" % ( target_batch_duration_secs)) - if not (target_batch_overhead or target_batch_duration_secs): + if max(0, target_batch_overhead, target_batch_duration_secs) == 0: raise ValueError("At least one of target_batch_overhead or " "target_batch_duration_secs must be positive.") self._min_batch_size = min_batch_size ---------------------------------------------------------------- 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: 154179) Time Spent: 0.5h (was: 20m) > Investigate negative numbers represented as 'long' in Python SDK + Direct > runner > -------------------------------------------------------------------------------- > > Key: BEAM-5744 > URL: https://issues.apache.org/jira/browse/BEAM-5744 > Project: Beam > Issue Type: Bug > Components: sdk-py-core > Reporter: Valentyn Tymofieiev > Assignee: Valentyn Tymofieiev > Priority: Major > Fix For: 2.8.0 > > Time Spent: 0.5h > Remaining Estimate: 0h > -- This message was sent by Atlassian JIRA (v7.6.3#76005)