chaokunyang commented on code in PR #2400:
URL: https://github.com/apache/fory/pull/2400#discussion_r2196481395
##########
python/pyfory/_registry.py:
##########
@@ -485,6 +488,15 @@ def _create_serializer(self, cls):
serializer = DataClassSerializer(self.fory, cls)
elif issubclass(cls, enum.Enum):
serializer = EnumSerializer(self.fory, cls)
+ elif hasattr(cls, "__getstate__") and hasattr(cls, "__setstate__"):
+ # Use StatefulSerializer for objects that support __getstate__
and __setstate__
+ # But exclude certain types that have incompatible state
methods
+ module_name = getattr(cls, "__module__", "")
+ if module_name.startswith("pandas."):
Review Comment:
Could we create an issue to address this in the future?
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]