Skip to content

Allow to overwrite the signature for Python functions #80723

Closed

Description

@serhiy-storchaka
BPO 36542
Nosy @gvanrossum, @serhiy-storchaka, @1st1, @tirkarthi
PRs
  • bpo-36542: Allow to overwrite the signature for Python functions. #12705
  • 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 = None
    closed_at = <Date 2019-08-31.20:11:37.440>
    created_at = <Date 2019-04-06.08:33:41.679>
    labels = ['3.8', 'type-feature', 'library']
    title = 'Allow to overwrite the signature for Python functions'
    updated_at = <Date 2019-08-31.20:11:37.440>
    user = 'https://github.com/serhiy-storchaka'

    bugs.python.org fields:

    activity = <Date 2019-08-31.20:11:37.440>
    actor = 'serhiy.storchaka'
    assignee = 'none'
    closed = True
    closed_date = <Date 2019-08-31.20:11:37.440>
    closer = 'serhiy.storchaka'
    components = ['Library (Lib)']
    creation = <Date 2019-04-06.08:33:41.679>
    creator = 'serhiy.storchaka'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 36542
    keywords = ['patch']
    message_count = 2.0
    messages = ['339530', '341621']
    nosy_count = 4.0
    nosy_names = ['gvanrossum', 'serhiy.storchaka', 'yselivanov', 'xtreak']
    pr_nums = ['12705']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue36542'
    versions = ['Python 3.8']

    Activity

    1. serhiy-storchaka commented on Apr 6, 2019

      @serhiy-storchaka
      MemberAuthor

      Currently __text_signature__ can be used for specifying signature of functions implemented in C. It is ignored for functions implemented in Python. The proposed PR allows to override the real signature of Python functions by setting the __text_signature__ attribute. This is needed to restore useful signatures in functions that use the *args hack to implement positional-only parameters. See the discussion for PR 12637.

    2. added
      stdlibStandard Library Python modules in the Lib/ directory
      type-featureA feature request or enhancement
      on Apr 6, 2019
    3. serhiy-storchaka commented on May 6, 2019

      @serhiy-storchaka
      MemberAuthor

      New changeset d53cf99 by Serhiy Storchaka in branch 'master':
      bpo-36542: Allow to overwrite the signature for Python functions. (GH-12705)
      d53cf99

    4. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.8 (EOL)end of lifestdlibStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancement

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions