esafak commented on code in PR #2400:
URL: https://github.com/apache/fory/pull/2400#discussion_r2196502424


##########
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:
   What do you want to do differently?



-- 
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]

Reply via email to