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.

Author terry.reedy
Recipients docs@python, terry.reedy
Date 2012-08-09.19:44:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1344541466.79.0.410789330017.issue15608@psf.upfronthosting.co.za>
In-reply-to
Content
On Windows, 3.3 socketserver defines 12 classes in 3 categories: servers, server mixins, and handlers. (At least, these are the one listed with dir(socketserver). Only BaseServer is indexed. I think all should be. There are also a couple of text issues.

BaseServer - indexed, doc is 20.19.2. Server Objects

TCPServer - mentioned in diagram and text of 20.19.1
UDPServer - ditto
(I presume *nix version have unixxxx classes also)

ForkingMixIn - text of 20.19.1
ThreadingMixIn - ditto

ForkingTCPServer
ForkingUDPServer
ThreadingTCPServer
ThreadingUDPServer

Text says "Forking and threading versions of each type of server can be created using the ForkingMixIn and ThreadingMixIn mix-in classes. For instance, a threading UDP server class is created as follows:
  class ThreadingUDPServer(ThreadingMixIn, UDPServer): pass
The mix-in class must come first, since it overrides a method defined in UDPServer."

"can be" means to me that user must create these. I am guessing that pre-defining them was added later. So text should change to 'have been'. The pre-created combinations should be listed. The last sentence could then say "Thhe mix-in class comes first since it overrides...". 

---
BaseRequestHandler

This is documented in 20.19.2 RequestHandler Objects. But instead of starting with something like

class socketserver.BaseRequestHandler 
This is the superclass of all RequestHandler objects. It defines the interface, given below, but does not implement most of the methods, which is done in subclasses. A new instance of the subclass is created for each request.

analogous to the initial entry in 20.19.1, 20.19.2 starts with

"The request handler class must define a new handle() method, and can override any of the following methods. A new instance is created for each request.

I suggest that this be replaced with a standard class entry like the one above. If done, I resume the "RequestHandler" method prefix should be "BaseRequestHandler".

StreamRequestHandler - these two are described in a paragraph
DatagramRequestHandler - after the handle method entry

---
In summary:
1. index all classes to point to locations indicated above.
2. state that mixin combinations are pre-defined.
3. give BaseRequestHandler a proper entry.
4. revise above as needed for *nix.
5. optionally adjust as needed for 2.7.
History
Date User Action Args
2012-08-09 19:44:27terry.reedysetrecipients: + terry.reedy, docs@python
2012-08-09 19:44:26terry.reedysetmessageid: <1344541466.79.0.410789330017.issue15608@psf.upfronthosting.co.za>
2012-08-09 19:44:26terry.reedylinkissue15608 messages
2012-08-09 19:44:24terry.reedycreate