Skip to content
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

Deprecate inspect.Signature.from_function and from_builtin #68436

Closed
1st1 opened this issue May 20, 2015 · 9 comments
Closed

Deprecate inspect.Signature.from_function and from_builtin #68436

1st1 opened this issue May 20, 2015 · 9 comments
Assignees
Labels
stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@1st1
Copy link
Member

1st1 commented May 20, 2015

BPO 24248
Nosy @brettcannon, @ncoghlan, @larryhastings, @1st1
Files
  • sig_warns.patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/1st1'
    closed_at = <Date 2015-05-21.03:09:25.916>
    created_at = <Date 2015-05-20.18:33:34.274>
    labels = ['type-bug', 'library']
    title = 'Deprecate inspect.Signature.from_function and from_builtin'
    updated_at = <Date 2015-05-21.03:11:08.371>
    user = 'https://github.com/1st1'

    bugs.python.org fields:

    activity = <Date 2015-05-21.03:11:08.371>
    actor = 'yselivanov'
    assignee = 'yselivanov'
    closed = True
    closed_date = <Date 2015-05-21.03:09:25.916>
    closer = 'yselivanov'
    components = ['Library (Lib)']
    creation = <Date 2015-05-20.18:33:34.274>
    creator = 'yselivanov'
    dependencies = []
    files = ['39439']
    hgrepos = []
    issue_num = 24248
    keywords = ['patch']
    message_count = 9.0
    messages = ['243684', '243685', '243695', '243711', '243712', '243717', '243718', '243719', '243721']
    nosy_count = 5.0
    nosy_names = ['brett.cannon', 'ncoghlan', 'larry', 'python-dev', 'yselivanov']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue24248'
    versions = ['Python 3.5']

    @1st1
    Copy link
    Member Author

    1st1 commented May 20, 2015

    I want to deprecate Signature.from_function and Signature.from_builtin in 3.5.

    There is no use for these methods (they aren't generic), and we also now have a very handy 'from_callable' for easy Signature subclassing.

    @1st1 1st1 self-assigned this May 20, 2015
    @1st1 1st1 added stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels May 20, 2015
    @1st1
    Copy link
    Member Author

    1st1 commented May 20, 2015

    Forgot to mention: from_function and from_builtin are not documented.

    @1st1
    Copy link
    Member Author

    1st1 commented May 20, 2015

    Patch is attached.

    @ncoghlan
    Copy link
    Contributor

    ncoghlan commented May 21, 2015

    +1 from me.

    The deprecation warning text in the patch has a typo (callback instead of callable).

    For the documentation, in addition to noting the deprecation itself, it may also be worth noting how to explicitly recreate the type restriction.

    @1st1
    Copy link
    Member Author

    1st1 commented May 21, 2015

    For the documentation, in addition to noting the deprecation itself, it may also be worth noting how to explicitly recreate the type restriction.

    Nick, what do you mean by "type restriction"? Also, since the functions aren't documented, I think we don't need to document that they are deprecated?

    @ncoghlan
    Copy link
    Contributor

    ncoghlan commented May 21, 2015

    Oh, right - you said they weren't documented, and I completely glazed over that bit.

    The "type restrictions" comment isn't valid in the absence of documentation, but it was basically about how to fully replicate the behaviour of the existing functions in conjunction with "from_callable".

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented May 21, 2015

    New changeset 64fba4ea031b by Yury Selivanov in branch 'default':
    bpo-24248: Deprecate inspect.Signature.from_function and .from_builtin
    https://hg.python.org/cpython/rev/64fba4ea031b

    @1st1
    Copy link
    Member Author

    1st1 commented May 21, 2015

    OK, committed! Thanks for the review, Nick.

    @1st1 1st1 closed this as completed May 21, 2015
    @1st1
    Copy link
    Member Author

    1st1 commented May 21, 2015

    I documented the deprecation in the whatsnew section anyways.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants