-
Notifications
You must be signed in to change notification settings - Fork 89
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 pickle" error message changed? #3223
Comments
It looks like CPython changed the error message here. We should probably still check the message, but handle both cases (patched CPython and unpatched). |
Thanks for finding this! Since this is the second time it's changing, perhaps we shouldn't check the text of the error message at all (which, like |
My feeling is that we want to carefully identify the "this doesn't pickle" case against a general failure of pickling that's not due to the lambda. We could even be more fine grained that we are now. So I'd be in favour of widening the test to handle all known variants of the message. If you want to take a different tradeoff between dev churn and silent errors, then relax the case! |
Okay, then, I'll make it |
In more than one PR, we're starting to see the following error (likely unrelated to those PRs).
It seems like the error message has changed.
The test was originally added by @agoose77 in #2757 with error message "Can't pickle local object".
awkward/tests/test_2757_attrs_metadata.py
Lines 41 to 45 in e7cccc9
Then I changed it in #2927 to "Can't pickle":
awkward/tests/test_2757_attrs_metadata.py
Lines 41 to 47 in c54d083
The new message, "Can't get local object 'test_serialise_with_nonserialisable_attrs..'", is essentially the same thing, though I don't know why the message is changing.
@agoose77, before I arbitrarily change the expected message again (or only catch the exception types and tell ruff that we don't want to constrain the error message), does anything seem wrong here?
The text was updated successfully, but these errors were encountered: