-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
DEP: Actually deprecate np.dtype('O8') #15822
DEP: Actually deprecate np.dtype('O8') #15822
Conversation
a63cce2
to
59668c9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, will probably just commit the suggestion and merge myself later. Fun typo, just shows that even simple code is better with tests :).
Hmm, a bit more fallout than I thought, there is an actual tests unpickling an |
I was under the impression that when unpickling the warning was already emitted. Am I mistaken? |
I am as confused as you are, but round tripping tests for Probably this is not array but the single |
Here's the issue: >>> np.dtype(object).__reduce__()
(numpy.dtype, ('O8', False, True), (3, '|', None, None, None, -1, -1, 63)) |
* that it is in an unpickle context instead of a normal context without | ||
* evil global state like we create here. | ||
*/ | ||
NPY_NO_EXPORT int evil_global_disable_warn_O4O8_flag = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we also get rid of extern declaration in conversion_utils.h
The code before tried to: * Deprecate `np.dtype('O8')` * Silently allow loading pickles containing `'O8'` But actually due to a logic bug: * Silently allowed `np.dtype('O8')` * Deprecated loading pickles containing `'O8'` Since we already deprecated the pickles for 8 years by accident, we may as well just deprecate both uses now.
64e38d0
to
429513f
Compare
There are still failing tests |
@eric-wieser Ping. Do you want to keep this open? You have a bunch of PRs, it would be helpful if you looked through them and decided which you would like to keep open. |
The code before tried to:
np.dtype('O8')
'O8'
But actually due to a logic bug:
np.dtype('O8')
'O8'
Since we already deprecated the pickles for 8 years by accident, we may as well just deprecate both uses now.