EA: require size instead of __len__
State: closed

Discussed [here](https://github.com/jbrockmendel/pandas/pull/3)

Change the EA interface to require `size` instead of `__len__`.

Doing this separately from #27142 makes it much simpler to explain to downstream authors what is changing for them.  After this, the rest of the changes necessary for (limited) 2D support should not affect downstream authors.

Labels:
name: ExtensionArray
description: Extending pandas with custom dtypes or arrays.

Comments:
looks like the docs thing is driven by a URLError
> do we need tests to guarantee this method exists in EA? e.g. for decmial / json / arrow bool does it?

This PR updates all of our internal (including tests.extension) EAs appropriately, and this is indirectly tested.

I've been giving some thought to how to test the "size must not depend on shape or len" requirement.  Thinking of something along the lines of a test that monkeypatches `shape` and `__len__` to raise, then calls `size`.  That leaves a corner case where an author could write a `size` property that only calls `shape` or `__len__` in some cases but not others.  Not sure this is worth worrying about.  Thoughts?
Can we schedule a call sometime this week to talk through this?
> Can we schedule a call sometime this week to talk through this?

Yes that is a good idea I think.

I am -1 on this PR until there is a clear vision and agreement on the next steps.
Wednesday or Thursday after 9 AM Pacific Time work for me
Both work for me (although I would prefer one hour earlier or 1.5 hour later)
these times are ok
An hour earlier on Wednesday works for me.  Pending Tom's schedule, let's go for Wednesday at 15:00 UTC.
I should be OK tomorrow (Wednesday) 1 hour earlier (8:00 Pacific / 16:00
CET) or 2.5 hours later (11:30 Pacific / 19:30 CET).

I'll be busy from 12:30 - 1:30 Central.

Free most of Friday.

On Mon, Sep 16, 2019 at 12:14 PM jbrockmendel <notifications@github.com>
wrote:

> Wednesday or Thursday after 9 AM Pacific Time work for me
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <https://github.com/pandas-dev/pandas/pull/28389?email_source=notifications&email_token=AAKAOIX6R2VCYZMB5WB4TZLQJ65F7A5CNFSM4IVV45DKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6Z3LYY#issuecomment-531871203>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AAKAOIV3YHYKHY5P55WKVCDQJ65F7ANCNFSM4IVV45DA>
> .
>

did we agree in a date / time?

> On Sep 17, 2019, at 10:55 AM, Tom Augspurger <notifications@github.com> wrote:
> 
> I should be OK tomorrow (Wednesday) 1 hour earlier (8:00 Pacific / 16:00
> CET) or 2.5 hours later (11:30 Pacific / 19:30 CET).
> 
> I'll be busy from 12:30 - 1:30 Central.
> 
> Free most of Friday.
> 
> On Mon, Sep 16, 2019 at 12:14 PM jbrockmendel <notifications@github.com>
> wrote:
> 
> > Wednesday or Thursday after 9 AM Pacific Time work for me
> >
> > —
> > You are receiving this because you commented.
> > Reply to this email directly, view it on GitHub
> > <https://github.com/pandas-dev/pandas/pull/28389?email_source=notifications&email_token=AAKAOIX6R2VCYZMB5WB4TZLQJ65F7A5CNFSM4IVV45DKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6Z3LYY#issuecomment-531871203>,
> > or mute the thread
> > <https://github.com/notifications/unsubscribe-auth/AAKAOIV3YHYKHY5P55WKVCDQJ65F7ANCNFSM4IVV45DA>
> > .
> >
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub, or mute the thread.

I think 15:00 UTC / 11:00 Eastern / 8:00 Pacific.
cc @pandas-dev/pandas-core we're having a call on this in ~25 minutes.

https://meet.google.com/gvh-okpg-qux

https://docs.google.com/document/d/1k_E_1oSV9VNHgGzepdeCyFdju8ZaXDwI3CvDYkhOtQ8/edit?usp=sharing
Sorry can't hear no sound headphones not working.



On Wed, 18 Sep 2019, 15:38 Tom Augspurger, <notifications@github.com> wrote:

> cc @pandas-dev/pandas-core
> <https://github.com/orgs/pandas-dev/teams/pandas-core> we're having a
> call on this in ~25 minutes.
>
> https://meet.google.com/gvh-okpg-qux
>
>
> https://docs.google.com/document/d/1k_E_1oSV9VNHgGzepdeCyFdju8ZaXDwI3CvDYkhOtQ8/edit?usp=sharing
>
> —
> You are receiving this because you are on a team that was mentioned.
> Reply to this email directly, view it on GitHub
> <https://github.com/pandas-dev/pandas/pull/28389?email_source=notifications&email_token=ADEMUXJZ6ZN24S2UBC6ESP3QKI4NJA5CNFSM4IVV45DKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7AJKLA#issuecomment-532714796>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/ADEMUXKA6BQE3XWEWXKMMPTQKI4NJANCNFSM4IVV45DA>
> .
>

Closing to clear the queue.