-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: Fix regression in is_list_like #43373
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
Conversation
is_list_like() used to use isinstance(obj, abc.Iterable) before pandas-dev#39852 where it was optimized for performance. This resulted in a regression where objects that explicitly declare __iter__ as None are considered "list like" but not instances of abc.Iterable.
no objection, ping on green (you can add a release not if you'd like), 1.4. |
Where do you think the best place to put the release note is? doc/sources/whatsnew/v1.4.0rst -> Bug Fixes -> Other? |
That's fine, yes. |
Shouldn't we backport is its a regression? |
-0 on backporting. its no big deal to do, but i think this is a very minor case. @phofl do you feel strongly here? |
No, just wanted to avoid that it gets missed |
ok let's do it. @aiudirog can you add a note to 1.3.3 regression section. |
Will do, I'll take care of it later tonight. |
Issue #42549 is related, but not the same as this issue: |
6ddce63
to
7c22955
Compare
6d428b7
to
d981c47
Compare
thanks @aiudirog |
@meeseeksdev backport 1.3.x |
Something went wrong ... Please have a look at my logs. |
Co-authored-by: aiudirog <[email protected]>
is_list_like()
used to useisinstance(obj, abc.Iterable)
before #39852 where it was optimized for performance. This resulted in a regression where objects that explicitly declare__iter__
asNone
are considered "list like" but not instances ofabc.Iterable
.Because the original original PR was focused on performance, here are the same timeit cases run on this PR: