Skip to content

Improve handling of deprecations in stubs #870

Open
@Daverball

Description

@Daverball

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 deprecating index=1 for DataFrame.groupby or "Series[Any] not callable" in the case of renaming DataFrame.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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions