Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't serialize some kinds of bound methods #107

Open
braxtonmckee opened this issue Jun 23, 2019 · 3 comments · May be fixed by #437
Open

Can't serialize some kinds of bound methods #107

braxtonmckee opened this issue Jun 23, 2019 · 3 comments · May be fixed by #437
Projects

Comments

@braxtonmckee
Copy link
Collaborator

Our methodology for serializing core python objects works for lots of things, but not certain kinds of types and methods. For instance

import numpy
import typed_python.Codebase as Codebase
sc = Codebase.Codebase.coreSerializationContext()

sc.serialize(numpy.array) # throws
sc.serialize(numpy.array([1,2,3])) # OK
sc.serialize(numpy.array([1,2,3]).max) # throws
sc.serialize(numpy.max) # throws

throw errors where named. We should be able to serialize any of these.

@braxtonmckee braxtonmckee added this to Unscheduled in TypedPython Jun 25, 2019
@braxtonmckee
Copy link
Collaborator Author

We can now serialize 'numpy.array', but not the method. Nor can we serialize bound methods of regular classes.

@braxtonmckee
Copy link
Collaborator Author

We should really just support the reduce protocol for objects like these

@wllgrnt
Copy link

wllgrnt commented Feb 16, 2023

c.f #417

wllgrnt pushed a commit that referenced this issue Feb 16, 2023
Tests that the reduce protocol is properly implemented, and
that issue #107 is fixed.
@wllgrnt wllgrnt linked a pull request Feb 16, 2023 that will close this issue
6 tasks
wllgrnt pushed a commit that referenced this issue Feb 17, 2023
Tests that the reduce protocol is properly implemented, and
that issue #107 is fixed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
TypedPython
Unscheduled
Development

Successfully merging a pull request may close this issue.

2 participants