Skip to content

DEPR: ExtensionOpsMixin -> OpsMixin #38142

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

Merged
merged 5 commits into from
Nov 29, 2020

Conversation

jbrockmendel
Copy link
Member

@jreback jreback added this to the 1.2 milestone Nov 29, 2020
@jreback jreback added Deprecate Functionality to remove in pandas ExtensionArray Extending pandas with custom dtypes or arrays. labels Nov 29, 2020
@jreback jreback merged commit f65f0d3 into pandas-dev:master Nov 29, 2020
@jreback
Copy link
Contributor

jreback commented Nov 29, 2020

thanks @jbrockmendel

@jbrockmendel jbrockmendel deleted the depr-ExtensionOpsMixin branch November 29, 2020 19:20
@jorisvandenbossche
Copy link
Member

Sorry, but this was not really ready:

  • There has been no discussion about what the actual use case of ExtensionScalarOpsMixin (the issue mentions we don't use it internally, but it's goal is to serve external users, not internal)
  • There is no indication in this PR of how to replace ExtensionScalarOpsMixin as a user of it
  • The warning message suggests OpsMixin (but which is not actually a replacement), but this is not publicly exposed

I don't know if we should keep the class, but we should at least discuss it (and check if there is usage of it), and if we deprecate it give a clear reasoning and alternative.

@jreback
Copy link
Contributor

jreback commented Nov 29, 2020

@jorisvandenbossche ahh re-read your comment on the issue. if you want to revert ok, but to be honest this looks better / simpler.

@@ -487,6 +487,7 @@ Deprecations
- Deprecated :meth:`Index.asi8` for :class:`Index` subclasses other than :class:`.DatetimeIndex`, :class:`.TimedeltaIndex`, and :class:`PeriodIndex` (:issue:`37877`)
- The ``inplace`` parameter of :meth:`Categorical.remove_unused_categories` is deprecated and will be removed in a future version (:issue:`37643`)
- The ``null_counts`` parameter of :meth:`DataFrame.info` is deprecated and replaced by ``show_counts``. It will be removed in a future version (:issue:`37999`)
- :class:`ExtensionOpsMixin` and :class:`ExtensionScalarOpsMixin` are deprecated and will be removed in a future version. Use ``pd.core.arraylike.OpsMixin`` instead (:issue:`37080`)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn't ever document something in pandas.core as public. If this is going to change, it should be exposed outside of core.

@TomAugspurger
Copy link
Contributor

cc @Dr-Irv, who I believe implemented the mixin. I suspect you're using it?

@jorisvandenbossche
Copy link
Member

I would say, let's revert it for now, until we have better discussed this. @jbrockmendel can you do that?

@jorisvandenbossche
Copy link
Member

Actually, clicking the button is not that hard ;) -> #38158

@jorisvandenbossche
Copy link
Member

I reopened the issue, let's continue the discussion there: #37080

@jreback
Copy link
Contributor

jreback commented Nov 29, 2020

Actually, clicking the button is not that hard ;) -> #38158

actually you can do this from the UI itself? (create a revert)

jreback pushed a commit that referenced this pull request Nov 30, 2020
jbrockmendel pushed a commit to jbrockmendel/pandas that referenced this pull request Nov 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Deprecate Functionality to remove in pandas ExtensionArray Extending pandas with custom dtypes or arrays.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DEPR: ExtensionOpsMixin in favor of OpsMixin
4 participants