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

Add support for system.methodSignature() to XMLRPC Server #57613

Open
rhettinger opened this issue Nov 14, 2011 · 3 comments
Open

Add support for system.methodSignature() to XMLRPC Server #57613

rhettinger opened this issue Nov 14, 2011 · 3 comments
Labels
stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@rhettinger
Copy link
Contributor

BPO 13404
Nosy @loewis, @rhettinger, @merwok, @florentx, @vajrasky
Files
  • add_method_signature_to_xmlrpc_server.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 = None
    closed_at = None
    created_at = <Date 2011-11-14.17:33:42.287>
    labels = ['type-feature', 'library']
    title = 'Add support for system.methodSignature() to XMLRPC Server'
    updated_at = <Date 2013-09-23.07:37:05.043>
    user = 'https://github.com/rhettinger'

    bugs.python.org fields:

    activity = <Date 2013-09-23.07:37:05.043>
    actor = 'vajrasky'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2011-11-14.17:33:42.287>
    creator = 'rhettinger'
    dependencies = []
    files = ['31847']
    hgrepos = []
    issue_num = 13404
    keywords = ['patch']
    message_count = 3.0
    messages = ['147623', '147641', '198315']
    nosy_count = 5.0
    nosy_names = ['loewis', 'rhettinger', 'eric.araujo', 'flox', 'vajrasky']
    pr_nums = []
    priority = 'normal'
    resolution = None
    stage = None
    status = 'open'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue13404'
    versions = ['Python 3.4']

    @rhettinger
    Copy link
    Contributor Author

    Currently, the server has a stub method that returns: 'signatures not supported'.

    Using the inspect module, it shouldn't be difficult to provide function/method signatures for over-the-wire introspection.

    @rhettinger rhettinger added stdlib Python modules in the Lib dir type-feature A feature request or enhancement labels Nov 14, 2011
    @loewis
    Copy link
    Mannequin

    loewis mannequin commented Nov 14, 2011

    How do you infer the data types for the parameters?

    @vajrasky
    Copy link
    Mannequin

    vajrasky mannequin commented Sep 23, 2013

    How do you infer the data types for the parameters?

    I don't think we can, unless we force them to use function annotation. If they don't use that feature, then we say the signature is not supported.

    The problem is getting deeper if we are talking about return value type.

    if a == 1:
      return 'spam'
    else:
      return 3.14

    I therefore embrace the dynamic nature of Python with this patch.

    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-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant