Skip to content

API: How much of the EA API can we commit to? #47148

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

Closed
Dr-Irv opened this issue May 27, 2022 · 5 comments · Fixed by #47225
Closed

API: How much of the EA API can we commit to? #47148

Dr-Irv opened this issue May 27, 2022 · 5 comments · Fixed by #47225
Labels
API Design Docs ExtensionArray Extending pandas with custom dtypes or arrays. Needs Discussion Requires discussion from core team before further action
Milestone

Comments

@Dr-Irv
Copy link
Contributor

Dr-Irv commented May 27, 2022

I am working with a commercial company that has a python API that they would like to extend to better support pandas. I suggested using the ExtensionArray interface. However, at https://pandas.pydata.org/docs/development/extending.html?highlight=extensionarray#extension-types we say this:

The pandas.api.extensions.ExtensionDtype and pandas.api.extensions.ExtensionArray APIs are new and experimental. They may change between versions without warning.

This is making them wary of building something that would no longer work in the future. I told them that we have lots of things in pandas that depend on the interface, so the likelihood of it going away is very small.

I see there is discussion in #32586 about revisiting the EA interface.

Can we say that parts of the EA API are "frozen" at this point? Or could the entire API change in the future? Can we now say that the API is no longer experimental?

Comments from @jbrockmendel and @jorisvandenbossche ?

@Dr-Irv Dr-Irv added Docs API Design Needs Discussion Requires discussion from core team before further action ExtensionArray Extending pandas with custom dtypes or arrays. labels May 27, 2022
@jbrockmendel
Copy link
Member

For the most part, I'd be comfortable removing the "without warning" part and committing the same kind of deprecation policy we use elsewhere (will need to look at the API to determine whether the "for the most part" caveat can be dropped).

@jreback
Copy link
Contributor

jreback commented May 28, 2022

i agree this has been stable for a while

that said we do want to make some changes to support arrow dtypes (in other PRs) so maybe we declare it stable in 2.0

@jorisvandenbossche
Copy link
Member

Indeed, agreed that we can remove that "experimental" label, and apply the same deprecation policy as we use in general.

In case that might give some reassurance, https://github.com/geopandas/geopandas/ is implementing an ExtensionArray and is a widely used package (and I don't think we really had a significant issue with the stability of the EA interface the last years).

@Dr-Irv
Copy link
Contributor Author

Dr-Irv commented Jun 3, 2022

I'm willing to create a PR that changes this text:

The pandas.api.extensions.ExtensionDtype and pandas.api.extensions.ExtensionArray APIs are new and experimental. They may change between versions without warning.

to

The pandas.api.extensions.ExtensionDtype and pandas.api.extensions.ExtensionArray APIs were experimental prior to pandas 1.4. Starting with version 1.4, future changes will follow the pandas deprecation policy.

Can we agree on that text before I create the PR?

@jreback
Copy link
Contributor

jreback commented Jun 4, 2022

+1

@jreback jreback added this to the 1.5 milestone Jun 5, 2022
@simonjayhawkins simonjayhawkins changed the title EA: How much of the EA API can we commit to? API: How much of the EA API can we commit to? Jun 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Design Docs ExtensionArray Extending pandas with custom dtypes or arrays. Needs Discussion Requires discussion from core team before further action
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants