We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Building the following module (src/module.py)
src/module.py
class MyClass: def __init__(self, a): self.a = a def my_method(self, b): return self.a + b
Using cython with the following setup script:
from distutils.core import setup from Cython.Build import cythonize setup(ext_modules=cythonize("src/module.py"))
Generates a class (MyClass), whose unbound methods cannot be pickled:
MyClass
In [1]: from module import MyClass In [2]: import pickle In [3]: pickle.dumps(MyClass.my_method) --------------------------------------------------------------------------- PicklingError Traceback (most recent call last) <ipython-input-3-cf09bde7c7ba> in <module> ----> 1 pickle.dumps(MyClass.my_method) PicklingError: Can't pickle <cyfunction MyClass.my_method at 0x7f8d130e9ea8>: attribute lookup my_method on module failed
The text was updated successfully, but these errors were encountered:
Note that this bug only affects non-extension cython classes:
cdef
MyClass.my_method
method_descriptor
cyfunction
__reduce__
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Building the following module (
src/module.py
)Using cython with the following setup script:
Generates a class (
MyClass
), whose unbound methods cannot be pickled:The text was updated successfully, but these errors were encountered: