lukecwik commented on a change in pull request #10892: [BEAM-8335] Make
TestStream to/from runner_api include the output_tags property.
URL: https://github.com/apache/beam/pull/10892#discussion_r384692255
##########
File path: sdks/python/apache_beam/testing/test_stream.py
##########
@@ -133,15 +140,17 @@ def __eq__(self, other):
return self.new_watermark == other.new_watermark and self.tag == other.tag
def __hash__(self):
- return hash(self.new_watermark)
+ return hash(str(self.new_watermark) + str(self.tag))
def __lt__(self, other):
return self.new_watermark < other.new_watermark
def to_runner_api(self, unused_element_coder):
+ tag = 'None' if self.tag is None else self.tag
Review comment:
This is a general problem with python tag naming where there is ambiguity.
It was worked around for Dataflow by using `out` for `None` and `out_<tag>` for
`tag` until it was removed in #10971
Unfortunately this name mangling was applied inconsistently throughout the
codebase which lead to arbitrary fix-ups.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services