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

Allow to overwrite the signature for Python functions #80723

Closed
serhiy-storchaka opened this issue Apr 6, 2019 · 2 comments
Closed

Allow to overwrite the signature for Python functions #80723

serhiy-storchaka opened this issue Apr 6, 2019 · 2 comments
Labels
3.8 only security fixes stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@serhiy-storchaka
Copy link
Member

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']

    @serhiy-storchaka
    Copy link
    Member Author

    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.

    @serhiy-storchaka serhiy-storchaka added 3.8 only security fixes stdlib Python modules in the Lib dir type-feature A feature request or enhancement labels Apr 6, 2019
    @serhiy-storchaka
    Copy link
    Member Author

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

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.8 only security fixes stdlib Python modules in the Lib dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant