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
types.CodeType arguments differ from CPython #61
Comments
Thanks for the bug report. I'll look into this. |
I've made some changes to nogil Python better support cloudpickle and submitted a PR to cloudpickle: You can use it immediately by running:
The above will get the patched version of cloudpickle from the alternative Python package index. I don't plan to change the signature of I agree about the error messages, but I don't plan to change them either. "nogil" Python is using "argument clinic" for the constructor -- that's also what 3.10+ is using -- 3.9 used |
Thanks @colesbury for the fix. I have integrated it upstream and it's now part of cloudpickle 2.1.0 so you should not need to maintain a forked version of cloudpickle with We can even work on adding a CI entry on cloudpickle to run its tests against the nogil branch if needed. |
@ogrisel - awesome! |
With nogil:
The same snippet works fine with CPython 3.9.
Context: I was trying to run the joblib test suite and one of the error happens when pickling a local function with cloudpickle:
Side-comment: CPython error are a bit nicer when wrong arguments are passed to
types.CodeType
for example something like this:Having similar more informative error messages in nogil would be very useful!
The text was updated successfully, but these errors were encountered: