[Patches] [ python-Patches-536883 ] SimpleXMLRPCServer auto-docing subclass

SourceForge.net noreply@sourceforge.net
Fri, 18 Apr 2003 14:06:27 -0700


Patches item #536883, was opened at 2002-03-29 20:52
Message generated for change (Comment added) made by loewis
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=536883&group_id=5470

Category: Library (Lib)
Group: Python 2.3
>Status: Closed
>Resolution: Accepted
Priority: 5
Submitted By: Brian Quinlan (bquinlan)
Assigned to: Martin v. Löwis (loewis)
Summary: SimpleXMLRPCServer auto-docing subclass

Initial Comment:
This SimpleXMLRPCServer subclass automatically serves 
HTML documentation, generated using pydoc, in response 
to an HTTP GET request (XML-RPC always uses POST).

Here are some examples:
http://www.sweetapp.com/cgi-bin/xmlrpc-test/rpc1.py
http://www.sweetapp.com/cgi-bin/xmlrpc-test/rpc2.py


----------------------------------------------------------------------

>Comment By: Martin v. Löwis (loewis)
Date: 2003-04-18 23:06

Message:
Logged In: YES 
user_id=21627

Thanks for the patch. Committed as

lib.tex 1.220
libdocxmlrpc.tex 1.1
whatsnew23.tex 1.139
DocXMLRPCServer.py 1.1
NEWS 1.734

I think the documentation is fine; I have trimmed it
somewhat to avoid repetition (I have also texified it).

----------------------------------------------------------------------

Comment By: Brian Quinlan (bquinlan)
Date: 2003-04-03 09:06

Message:
Logged In: YES 
user_id=108973

Module resubmitted with test function.

Documentation attached in text format. The documentation 
doesn't seem terribly good to me so feel free to suggest 
changes. Will it be clear to the newbie that they should look 
at SimpleXMLRPCServer for RPC related methods?

----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2003-03-31 23:30

Message:
Logged In: YES 
user_id=21627

Ok, leave the naming as-is, unless other reviewers comment
in one direction or the other.

----------------------------------------------------------------------

Comment By: Brian Quinlan (bquinlan)
Date: 2003-03-31 11:22

Message:
Logged In: YES 
user_id=108973

Write test function: ok
Write documentation: ok

>If the module is named, say, DocXMLRPCServer, there is 
>no need to have the Doc prefix on the class names.

Hmmm. If you look at the core BaseHTTPRequestHandler 
derived classes,  each one is prefixed to match the module 
that it is found in. The only two modules that I can think of 
with identical class names are cStringIO and StringIO, which 
theoretically provide identical semantics.


----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2003-03-31 11:07

Message:
Logged In: YES 
user_id=21627

I see. The code is fine, but it needs to come with a test 
function, to operate the module as a program. I suggest that 
the test server provides the get_source_code() operation just 
as your demo client does; the docstring of the class may 
provide an xmlrpclib fragment that retrieves the source code 
(AFAICT, the source code is not directly accessible through 
an URL, is it?)

I also recommend that you reconsider renaming the classes: 
If the module is named, say, DocXMLRPCServer, there is no 
need to have the Doc prefix on the class names. Instead, 
they can be named just "XMLRPCServer" etc.


----------------------------------------------------------------------

Comment By: Brian Quinlan (bquinlan)
Date: 2003-03-31 08:56

Message:
Logged In: YES 
user_id=108973

>I'm not sure how to place this. Is this an extension to
>pydoc? 

No. This module provides subclasses for 
SimpleXMLRPCServer and CGIXMLRPCServer. These 
subclasses serve pydoc-style documentation when you point 
your browser at them - see the examples in the patch 
summary.

> Should it go into Tools, or into Lib, or into some
> existing module?

The attached file should go into Lib.

> If this goes into Lib somewhere, it lacks documentation.

Fair enough. Conditional on me writing documentation, is this 
contribution acceptable as is?


----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2003-03-30 16:59

Message:
Logged In: YES 
user_id=21627

I'm not sure how to place this. Is this an extension to
pydoc? Should it go into Tools, or into Lib, or into some
existing module?

If this goes into Lib somewhere, it lacks documentation.

----------------------------------------------------------------------

Comment By: Brian Quinlan (bquinlan)
Date: 2003-02-10 21:25

Message:
Logged In: YES 
user_id=108973

Patch 473586 has been accepted so this patch can be 
accepted.

----------------------------------------------------------------------

Comment By: Brian Quinlan (bquinlan)
Date: 2002-04-04 21:26

Message:
Logged In: YES 
user_id=108973

Sorry, I was sloppy about the description:

This patch is dependant on patch 473586:
[473586] SimpleXMLRPCServer - fixes and CGI

So please don't check this in until that patch is accepted.

----------------------------------------------------------------------

Comment By: Brian Quinlan (bquinlan)
Date: 2002-04-04 19:55

Message:
Logged In: YES 
user_id=108973

Sorry, I was sloppy about the description:

This patch is dependant on patch 473586:
[473586] SimpleXMLRPCServer - fixes and CGI

So please don't check this in until that patch is accepted.

----------------------------------------------------------------------

Comment By: Guido van Rossum (gvanrossum)
Date: 2002-04-04 19:31

Message:
Logged In: YES 
user_id=6380

Looks cute to me. Fredrik, any problem if I just check this
in?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=536883&group_id=5470