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
__shared_instance_cache__ = False
pickle
pickle 时会引发异常,如:
TypeError: cannot pickle '_thread.lock' object
The text was updated successfully, but these errors were encountered:
当将 __shared_instance_cache__ 设为 True 时,其实例可以正确进行对象序列化和反序列化。但实例的方法在反序列化引发如下异常:
__shared_instance_cache__
True
TypeError: MethodCaller.__new__() missing 4 required positional arguments: 'cls_', 'sget', 'name', and 'method'
Sorry, something went wrong.
问题已定位到 MethodCaller.__init__ 中的行 self.__sget = sget,后续将进一步排查。
MethodCaller.__init__
self.__sget = sget
当前可通过将需要 pickle 的方法加入到 __not_cache__ 列表中来规避这个问题。
__not_cache__
2018-11-27
No branches or pull requests
pickle
时会引发异常,如:The text was updated successfully, but these errors were encountered: