-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
DEPR: ExtensionOpsMixin in favor of OpsMixin #37080
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
Comments
The ExtensionScalarOpsMixin is not for internal use, it's for external use (so that fact that it's not used internally doesn't really matter, the question is what external users should do) |
So this was originally added in #37080 by @Dr-Irv. As mentioned above, this class was not directly meant for internal use (we also didn't use it internally at that time), but to make it easier for external users to implement EAs. It might be that we have thought of better ways now or that we think this is not actually needed, but in any case, the OpxMixin is not a direct replacement of the functionality provided by the ScalarOpsMixin. |
we could deprecated ExtensionOpsMixin and re-implement ScalarOpsMixin using OpsMixin instead of ExtensionOpsMixin |
That could be an option yes |
See the docs here: https://pandas.pydata.org/docs/development/extending.html?highlight=extensionscalaropsmixin#extensionarray-operator-support As long as the changes made support the second use case listed there (where the operators are already defined on the underlying individual scalar objects), I wouldn't have any major objections. I should note that the PR #38142 (that was reverted in #38158) did not address the documentation issue referenced above, so I am glad to see that the deprecation suggestion is not part of pandas yet. |
All our internal uses have been moved over except for the DecimalArray tests, which use ExtensionScalarOpsMixin.
The text was updated successfully, but these errors were encountered: