8000 Deprecate arguments · Issue #57 · laurent-laporte-pro/deprecated · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Deprecate arguments #57
Open
Open
@dyollb

Description

@dyollb

This is a feature idea, not a bug report.

It would be great if deprecated could warn about deprecated arguments, e.g. like

@deprecated_arg(name="old_arg_name", since="1.2", version=mypackage.__version__, reason="'old_arg_name' is not consistent with some reference")
def my_function(old_arg_name, other_args):
    pass

which would yield a message like:

"my_function" called with deprecated argument "old_arg_name"

Optionally with a new name hint, so

@deprecated_arg(name="old_arg_name", new_name="new_arg_name", since="1.2", version=mypackage.__version__)
def my_function(old_arg_name, other_args):
    pass

which would yield a message like:

"my_function" called with deprecated argument "old_arg_name". Please use "new_arg_name"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0