ENH: Make `deprecate_nonkeyword_arguments` alter function signature

This issue has been tracked since 2022-09-21.

Feature Type

  • Adding new functionality to pandas

  • Changing existing functionality in pandas

  • Removing existing functionality in pandas

Problem Description

Currently deprecate_nonkeyword_arguments does not alter the function signature. This means that help and ?? will show the deprecated signatures. This also affects recent attempts to achieve better typing of pandas using stubtest, e.g. see #47817 (review) and python/mypy#13703

Feature Description

Set the __signature__ attr on the decorated function

Alternative Solutions

Wait for all the removals to take place

Additional Context

No response

hauntsaninja wrote this answer on 2022-09-21

Opened PR at #48693 cc @twoertwein

More Details About Repo
Owner Name pandas-dev
Repo Name pandas
Full Name pandas-dev/pandas
Language Python
Created Date 2010-08-24
Updated Date 2022-10-04
Star Count 35430
Watcher Count 1120
Fork Count 15089
Issue Count 3589

YOU MAY BE INTERESTED

Issue Title Created Date Updated Date