Repository navigation
DEP: FutureWarning for void.item(): Will return bytes - #10044
Conversation
9451ff9 to
4821ab8
Compare
4821ab8 to
40e599a
Compare
|
I don't like the idea of an unconditional warning, especially when numpy has a habit of calling |
|
While it would be ideal to make it configurable, it also seems tricky, and the cost/benefit ratio of coding it up seems high. Some points in favor of an unconditional warning:
|
|
Running |
|
I'm not sure it's a bug, but I'd also add that it raises an error like in my case 3. (In fact, it gives different errors in Python3 and Python2). It might not be a bug because once we switch to returning |
There was a problem hiding this comment.
Maybe worth noting that this is already possible with bytes(void_obj) and/or bytearray(void_obj)
40e599a to
c4c3e79
Compare
|
Let's go with the |
There was a problem hiding this comment.
Technically this is not a C++ comment :) I'll fix it though.
There was a problem hiding this comment.
Hmm, Is this restriction needed? For that matter, is it wanted? What if someone wants to find all the places that need fixing?
|
Yeah I think I should remove the As to the question of how to turn off the warning if it is not needed, I think the user should just use |
c4c3e79 to
1f78eab
Compare
|
Merged, thanks Allan. We'll see how it goes ... |
This PR holds off on the changes of #8157 (to fix #8129), and instead issues a FutureWarning if anyone calls
void.item(). We would push off #8157 to 1.15.