chaokunyang opened a new issue, #2402:
URL: https://github.com/apache/fory/issues/2402

   ### Feature Request
   
   Fory and Pickle doesn't support serialize local class object, for example:
   
   ```python
   def f():
       from dataclasses import dataclass
   
       @dataclass
       class LocalClass:
           a: int
           b: str
   
       local_class_instance = LocalClass(a=1, b="2")
       return local_class_instance
   
   
   import pickle
   
   pickle.dumps(f())
   ```
   
   will get error:
   ```python
   AttributeError                            Traceback (most recent call last)
   Cell In[6], line 15
        10     return local_class_instance
        13 import pickle
   ---> 15 pickle.dumps(f())
   
   AttributeError: Can't pickle local object 'f.<locals>.LocalClass'
   ```
   
   Fory can't serialize such objects too.
   
   ### Is your feature request related to a problem? Please describe
   
   _No response_
   
   ### Describe the solution you'd like
   
   _No response_
   
   ### Describe alternatives you've considered
   
   _No response_
   
   ### Additional context
   
   _No response_


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