-
-
Notifications
You must be signed in to change notification settings - Fork 129
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
Improve handling of deprecations in stubs #870
Comments
I wasn't aware of the new Prior to that, we've had a policy of removing deprecated behavior in the stubs to encourage people to stop using deprecated behavior. Going forward, we can see if we can make @twoertwein Your thoughts? |
I'm fine accepting PRs that use it! I'm not sure whether that will create more maintenance burden on our side:
xref #848 (comment) I think we should definitely use this decorator for breaking changes in major releases (that currently do not warn; pandas 3.0). Currently we silence these cases in the CI but users do not get a heads up. |
If you're worried about maintenance burden, a reasonable compromise could be to only use I.e. in the case of renaming |
This is mostly a meta issue, I've noticed that when upgrading the stubs for version 2.1.0 the deprecated methods/overloads have been immediately removed.
We now have
typing_extensions.deprecated
, which I think should be preferred in such cases, since it will create vastly more readable error messages, compared to "No overload variant matches argument types" in the case of deprecatingindex=1
forDataFrame.groupby
or "Series[Any] not callable" in the case of renamingDataFrame.applymap
.In the former case we could've added a deprecated overload that still accepts
ColumnAxis
and in the latter made a copy of the method and applied the decorator to the deprecated method name.The text was updated successfully, but these errors were encountered: