robertwb commented on code in PR #33157:
URL: https://github.com/apache/beam/pull/33157#discussion_r1847271838
##########
sdks/python/apache_beam/coders/coder_impl.py:
##########
@@ -500,7 +500,9 @@ def encode_special_deterministic(self, value, stream):
self.encode_to_stream(value.value, stream, True)
except Exception as e:
raise TypeError(self._deterministic_encoding_error_msg(value)) from e
- elif hasattr(value, "__getstate__"):
+ elif (hasattr(value, "__getstate__") and
+ # https://github.com/apache/beam/issues/33020
+ type(value).__reduce__ == object.__reduce):
if not hasattr(value, "__setstate__"):
Review Comment:
Well, thanks goes to you for hunting down the root cause; it was not obvious
at all what was going on here :). I'll merge once tests pass.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]