[issue7769] SimpleXMLRPCServer.SimpleXMLRPCServer.register_function as decorator

2017-03-31 Thread Donald Stufft
Changes by Donald Stufft : -- pull_requests: +1032 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue7769] SimpleXMLRPCServer.SimpleXMLRPCServer.register_function as decorator

2017-03-24 Thread Xiang Zhang
Xiang Zhang added the comment: New changeset 267b9d2fa8efce7c5bc34ce50048ebca8fddf04f by Xiang Zhang in branch 'master': bpo-7769: enable xmlrpc.server.SimpleXMLRPCDispatcher.register_function used as decorator (GH-231) https://github.com/python/cpython/commit/267b9d2fa8efce7c5bc34ce50048ebca8

[issue7769] SimpleXMLRPCServer.SimpleXMLRPCServer.register_function as decorator

2017-03-17 Thread Larry Hastings
Changes by Larry Hastings : -- pull_requests: +625 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue7769] SimpleXMLRPCServer.SimpleXMLRPCServer.register_function as decorator

2017-02-28 Thread Xiang Zhang
Xiang Zhang added the comment: Thanks everyone involved! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue7769] SimpleXMLRPCServer.SimpleXMLRPCServer.register_function as decorator

2017-02-27 Thread Xiang Zhang
Xiang Zhang added the comment: Thanks Raymond. I would like to keep the example style another issue, not this one. :-) And I hope someone is willing to review the PR. -- assignee: -> xiang.zhang stage: needs patch -> patch review versions: +Python 3.7 -Python 3.6 _

[issue7769] SimpleXMLRPCServer.SimpleXMLRPCServer.register_function as decorator

2017-02-27 Thread Raymond Hettinger
Raymond Hettinger added the comment: +1 for the decorator idea. It feels very natural. A little off topic, I do not like the with-statement example that we currently have in the docs. I think it is bad design to put some much code inside with-block. In the micro-webframeworks, we register f

[issue7769] SimpleXMLRPCServer.SimpleXMLRPCServer.register_function as decorator

2017-02-21 Thread Xiang Zhang
Changes by Xiang Zhang : -- pull_requests: +194 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue7769] SimpleXMLRPCServer.SimpleXMLRPCServer.register_function as decorator

2016-09-07 Thread Xiang Zhang
Xiang Zhang added the comment: > Also one side effect that I can not eliminate is when it is used as a normal > function, the function instead of None is returned. I see the former patches > get this problem too. I think this does not matter after seeing functools.singledispatch. The versiona

[issue7769] SimpleXMLRPCServer.SimpleXMLRPCServer.register_function as decorator

2016-07-07 Thread Xiang Zhang
Xiang Zhang added the comment: >From the old comments from Brian it seems he's willing to accept such a >feature. But unfortunately Brian seems not interested in this now. IMHO, this >is good feature especially to people familiar with Bottle and Flask. Writing >in a decorator way seems more el

[issue7769] SimpleXMLRPCServer.SimpleXMLRPCServer.register_function as decorator

2016-07-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I don't have an opinion about needing this feature. But for accepting it needs more documenting. The signature should be updated, the new feature should be documented in the main text, not only in the versionchanged note. Needed examples of using egister_fun

[issue7769] SimpleXMLRPCServer.SimpleXMLRPCServer.register_function as decorator

2016-07-06 Thread Brian Curtin
Changes by Brian Curtin : -- nosy: -brian.curtin ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue7769] SimpleXMLRPCServer.SimpleXMLRPCServer.register_function as decorator

2016-07-06 Thread Xiang Zhang
Xiang Zhang added the comment: ping -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/m

[issue7769] SimpleXMLRPCServer.SimpleXMLRPCServer.register_function as decorator

2016-06-17 Thread Xiang Zhang
Changes by Xiang Zhang : -- nosy: +loewis, serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue7769] SimpleXMLRPCServer.SimpleXMLRPCServer.register_function as decorator

2016-06-15 Thread Xiang Zhang
Xiang Zhang added the comment: Hi, I've written a patch to accomplish this in Py3.6. This patch is much cleaner but has one drawback, when used as decorator factory, you have to specify name as a keyword argument. But considering the codes that have to been imported to check arguments, I think

[issue7769] SimpleXMLRPCServer.SimpleXMLRPCServer.register_function as decorator

2016-06-15 Thread Xiang Zhang
Changes by Xiang Zhang : -- nosy: +xiang.zhang ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue7769] SimpleXMLRPCServer.SimpleXMLRPCServer.register_function as decorator

2016-05-31 Thread Berker Peksag
Berker Peksag added the comment: Here's some quick review comments: * xmlrpc_register_decorator_py33.patch doesn't apply cleanly anymore. * -serv.register_function(my_function) +serv.register_function(_my_function, name='my_function') We should keep ``serv.register_function

[issue7769] SimpleXMLRPCServer.SimpleXMLRPCServer.register_function as decorator

2014-06-17 Thread Claudiu Popa
Changes by Claudiu Popa : -- nosy: +Claudiu.Popa ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue7769] SimpleXMLRPCServer.SimpleXMLRPCServer.register_function as decorator

2014-06-17 Thread Claudiu Popa
Changes by Claudiu Popa : -- stage: test needed -> patch review versions: +Python 3.5 -Python 3.3 ___ Python tracker ___ ___ Python-bug

[issue7769] SimpleXMLRPCServer.SimpleXMLRPCServer.register_function as decorator

2011-03-09 Thread Johannes Schönberger
Johannes Schönberger added the comment: sorry, I totally forgot about this... -- ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue7769] SimpleXMLRPCServer.SimpleXMLRPCServer.register_function as decorator

2011-03-08 Thread Santoso Wijaya
Santoso Wijaya added the comment: I see. Attaching a patch against 3.3 tip, then. -- Added file: http://bugs.python.org/file21058/xmlrpc_register_decorator_py33.patch ___ Python tracker ___

[issue7769] SimpleXMLRPCServer.SimpleXMLRPCServer.register_function as decorator

2011-03-08 Thread Brian Curtin
Brian Curtin added the comment: Santoso - since this is a feature request it would need to be retargeted to 3.3 -- versions: +Python 3.3 -Python 2.7 ___ Python tracker ___ __

[issue7769] SimpleXMLRPCServer.SimpleXMLRPCServer.register_function as decorator

2011-03-08 Thread Santoso Wijaya
Santoso Wijaya added the comment: I'm attaching a patch against 2.7 tip for an initial implementation of this decorator feature as well as sample usage in unittest, to get the ball rolling. The modified function should work as a decorator while preserving backward compatibility to be used in

[issue7769] SimpleXMLRPCServer.SimpleXMLRPCServer.register_function as decorator

2011-03-07 Thread Santoso Wijaya
Changes by Santoso Wijaya : -- nosy: +santa4nt ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue7769] SimpleXMLRPCServer.SimpleXMLRPCServer.register_function as decorator

2010-01-24 Thread Johannes Schönberger
Johannes Schönberger added the comment: OK, will work on it and reply as soon as I have results! -- ___ Python tracker ___ ___ Python-

[issue7769] SimpleXMLRPCServer.SimpleXMLRPCServer.register_function as decorator

2010-01-24 Thread Brian Curtin
Brian Curtin added the comment: Once you get a Subversion checkout of the source, have a look in Lib/test/test_xmlrpc.py for examples of how things are currently tested (using unittest). Once you get a feel for it, add new tests for what your changes do. The file you paste'd looks good as an

[issue7769] SimpleXMLRPCServer.SimpleXMLRPCServer.register_function as decorator

2010-01-24 Thread Johannes Schönberger
Johannes Schönberger added the comment: OK, thank you for the links! Do you still want me to do anything (like test cases etc.)? -- ___ Python tracker ___ __

[issue7769] SimpleXMLRPCServer.SimpleXMLRPCServer.register_function as decorator

2010-01-24 Thread Brian Curtin
Brian Curtin added the comment: http://www.python.org/dev/workflow/ and http://python.org/dev/faq/ should help you get started. The workflow doc will let you know what the process is around here. The FAQ will tell you how to setup Subversion, how to make a diff, etc. With that said, I think y

[issue7769] SimpleXMLRPCServer.SimpleXMLRPCServer.register_function as decorator

2010-01-24 Thread Johannes Schönberger
Johannes Schönberger added the comment: I'm not very used to working with bug/issue trackers, is there any tutorial here, where this is explained? I did the stuff you asked me to do: diff: http://paste.pocoo.org/compare/169357/169359/ test: http://paste.pocoo.org/show/169360/ -- ___

[issue7769] SimpleXMLRPCServer.SimpleXMLRPCServer.register_function as decorator

2010-01-24 Thread Brian Curtin
Brian Curtin added the comment: Can you submit your patch as a unified diff -- it's not easy to tell where you made changes to that file. Can you also include tests showing how this is used, especially using register_function in both the old way and the new way you propose? Lib/test/test_xml

[issue7769] SimpleXMLRPCServer.SimpleXMLRPCServer.register_function as decorator

2010-01-24 Thread Johannes Schönberger
New submission from Johannes Schönberger : I would suggest to make SimpleXMLRPCServer.SimpleXMLRPCServer.register_function a decorator function. See the attached file for the solution I wrote (l.209-240), which also works with the current syntax: @server.register_function @server.register_funct