MAINT: Work with unicode strings in dtype('i8,i8')#15261
Conversation
f9efee7 to
03dfab7
Compare
seberg
left a comment
There was a problem hiding this comment.
LGTM, nice. I think in conversion_utils.py there is another bunch of these were the logic should be reversed like here. I think this can change the error type in very weird, but it seems Unicode*Error inherits from ValueError so nothing really changes, and quite honestly it would be very weird cases in any case.
|
Needs a rebase. |
|
Will rebase on #15310 once that goes in |
03dfab7 to
21f012c
Compare
Right now, we convert `str` objects to `bytes`, and then work with those. Since this is a human convenience API, the input really ought to be a string. A future patch will suggest deprecating `dtype(b'i8,i8')`, but for now it will continue to work.
21f012c to
e83bd46
Compare
|
Thanks @eric-wieser |
|
@seberg: Mind elaborating on that with a link to a line? |
|
I think I thought of invalid unicode input. But the change of error type doesn't happen of course. The error message just improved a bit for |
I meant regarding this, sorry for being unclear |
|
Ah, I meant this type of thing: I think most converters that accept strings will convert unicode to ascii and then make a recursive call. |
Right now, we convert
strobjects tobytes, and then work with those.Since this is a human convenience API, the input really ought to be a string.
A future patch will suggest deprecating
dtype(b'i8,i8'), but for now it will continue to work.Should fix the CI failures in #15249