This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Add support for system.methodSignature() to XMLRPC Server
Type: enhancement Stage:
Components: Library (Lib) Versions: Python 3.4
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: eric.araujo, flox, loewis, rhettinger, vajrasky
Priority: normal Keywords: patch

Created on 2011-11-14 17:33 by rhettinger, last changed 2022-04-11 14:57 by admin.

Files
File name Uploaded Description Edit
add_method_signature_to_xmlrpc_server.patch vajrasky, 2013-09-23 07:37 review
Messages (3)
msg147623 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2011-11-14 17:33
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.
msg147641 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2011-11-14 23:30
How do you infer the data types for the parameters?
msg198315 - (view) Author: Vajrasky Kok (vajrasky) * Date: 2013-09-23 07:37
> 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.
History
Date User Action Args
2022-04-11 14:57:23adminsetgithub: 57613
2013-09-23 07:37:05vajraskysetfiles: + add_method_signature_to_xmlrpc_server.patch

nosy: + vajrasky
messages: + msg198315

keywords: + patch
2013-07-12 07:43:39rhettingersetversions: + Python 3.4, - Python 3.3
2011-11-18 17:21:07eric.araujosetnosy: + eric.araujo
2011-11-14 23:30:28loewissetmessages: + msg147641
2011-11-14 23:00:21pitrousetnosy: + loewis, flox
2011-11-14 17:33:42rhettingercreate