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
Cannot pickle classes derived from ABC with abc.abstract* decorators #367
Comments
They're probably widely used enough that it'd be nice for cloudpickle to support them, but FYI, @classmethod
@abc.abstractmethod
def the_method(cls, ...):
... (and similarly for |
You're right, they are. Perhaps it might be better to send some PRs upstream to use the preferred usage. I tried putting together a quick PR, but it seemed to break things for python versions < 3.8. |
Indeed, thanks for the notice. I would consider reviewing a PR that add support for them but no time to work on it myself. |
I have improved the tests in #371 to check that the pattern described by @ssanderson works as expected with cloudpickle. |
This may be an issue specific to Python 3.8, but I'm unable to cloudpickle objects whose class is derived from an
abc.ABC
derived base class with either one of these decorators:abc.abstractproperty
abc.abstractclassmethod
abc.abstractstaticmethod
Note:
abc.abstractmethod
appears to be fine.Here's a simple test case (that currently fails):
See also joblib/joblib#989
The text was updated successfully, but these errors were encountered: