Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Python

socketserver.BaseRequestHandler and socketserver.StreamRequestServer docs

 

 

Python python RSS feed   Index | Next | Previous | View Threaded


lipskathekat at yahoo

Aug 9, 2012, 8:15 AM

Post #1 of 10 (310 views)
Permalink
socketserver.BaseRequestHandler and socketserver.StreamRequestServer docs

First of all sincere apologies if this is blindingly obvious and I just
missed it

In the documentation at

http://docs.python.org/py3k/library/socketserver.html

mention is made more than once of a class
socketserver.StreamRequestHandler

in the examples in this chapter we see usage examples for
socketserver.BaseRequestHandler

I am trying to find documentation for these two classes as I would like
to use the former and, well I'd just like to learn more aout the latter.
I've looked in the general index and used Google. The problem is that
however hard I look I just cannot find it !!!

In Eclipse I have the entire standard library mounted on an explorer
node. When I find socketserver.py I can navigate to the
BaseRequestHandler and StreamRequestHandler classes
but I can't find the (documented) class [socketserver].RequestHandler
class in socketserver.py nor can I find any explicit documentation for
the classes socketserver.StreamRequestHandler
and socketserver.BaseRequestHandler.

I'm probably being INCREDIBLY dense here but what am I missing ?

Incidently if I read the code for these two classes I CAN understand
what they do but this is not always the case and anyway, how many other
potentially useful classes are lurking undocumented in the library

This is NOT intended as a criticism but it is frustrating.

many thanks

lipska
--
Lipska the Kat: Troll hunter, sandbox destroyer
and farscape dreamer of Aeryn Sun
--
http://mail.python.org/mailman/listinfo/python-list


lipskathekat at yahoo

Aug 9, 2012, 11:08 AM

Post #2 of 10 (309 views)
Permalink
Re: socketserver.BaseRequestHandler and socketserver.StreamRequestServer docs [In reply to]

On 09/08/12 18:39, Dennis Lee Bieber wrote:
> On Thu, 09 Aug 2012 16:15:33 +0100, lipska the kat
> <lipskathekat [at] yahoo> declaimed the following in
> gmane.comp.python.general:
>
>
>> in the examples in this chapter we see usage examples for
>> socketserver.BaseRequestHandler
>>
> So far as I can tell, all RequestHandler objects are covered in
> section "20.19.3 RequestHandler Objects"
>
>>
>> In Eclipse I have the entire standard library mounted on an explorer
>> node. When I find socketserver.py I can navigate to the
>> BaseRequestHandler and StreamRequestHandler classes
>> but I can't find the (documented) class [socketserver].RequestHandler
>> class in socketserver.py nor can I find any explicit documentation for
>> the classes socketserver.StreamRequestHandler
>> and socketserver.BaseRequestHandler.
>>
>
> There is no "RequestHandler" class. The section is general to all
> RequestHandler OBJECTS (Base, Stream, and Datagram).
>
> Stream and Datagram request handlers are subclasses of Base, in
> which the setup/finish methods handle the creation/destruction of
> "file-like" attributes -- allowing one to just do read/write operations
> within the core handle() method, instead of having to be concerned with
> the type of connection and performing actual socket recv()/send()
> operations. They are documented in the second paragraph of the .handle()
> method in sectin 20.19.3
>
> In all cases, you are responsible for providing the contents of the
> handle() method.
>
>
>


--
Lipska the Kat: Troll hunter, sandbox destroyer
and farscape dreamer of Aeryn Sun
--
http://mail.python.org/mailman/listinfo/python-list


lipskathekat at yahoo

Aug 9, 2012, 11:37 AM

Post #3 of 10 (308 views)
Permalink
Re: socketserver.BaseRequestHandler and socketserver.StreamRequestServer docs [In reply to]

On 09/08/12 18:39, Dennis Lee Bieber wrote:
> On Thu, 09 Aug 2012 16:15:33 +0100, lipska the kat
> <lipskathekat [at] yahoo> declaimed the following in
> gmane.comp.python.general:
>
>
>> in the examples in this chapter we see usage examples for
>> socketserver.BaseRequestHandler
>>
> So far as I can tell, all RequestHandler objects are covered in
> section "20.19.3 RequestHandler Objects"

Yes, I know, I've read it. Thank you.

> There is no "RequestHandler" class. The section is general to all
> RequestHandler OBJECTS (Base, Stream, and Datagram).

Yes I know, I've read socketserver.py. Thank you.
Why do I find myself getting annoyed here ?

This is hard work but I'll try again.

socketserver.RequestHandler is EXPLICITLY documented in section "20.19.3
RequestHandler Objects" yet does not exist in socketserver.py
Does this not strike you as odd. I certainly strikes me as odd. Maybe it
should be socketserver.BaseRequestHandler that is documented here.

The CLASSES socketserver.StreamRequestHandler and
socketserver.DatagramRequestHandler are DEFINED in socketserver.py
They are NOT Objects, they are CLASSES yet they are NOT EXPLICITLY
documented in section 20.19.3 or any other section as far as I can tell.

This is the question I was asking. I am quite capable of extracting the
slightly obtuse documentation in the section and confirming my
assumptions by reading the code.

So, I'll try again.

Is there anywhere that documents EXPLICITLY all the publicly visible
classes in the standard library.

If there is I'd be most grateful if you could point me to it as I can't
find it

If there isn't how does one go about
contributing to the documentation.

Thank you for taking the time to reply

lipska

--
Lipska the Kat: Troll hunter, sandbox destroyer
and farscape dreamer of Aeryn Sun
--
http://mail.python.org/mailman/listinfo/python-list


breamoreboy at yahoo

Aug 9, 2012, 11:55 AM

Post #4 of 10 (308 views)
Permalink
Re: socketserver.BaseRequestHandler and socketserver.StreamRequestServer docs [In reply to]

On 09/08/2012 19:37, lipska the kat wrote:
> On 09/08/12 18:39, Dennis Lee Bieber wrote:
>> On Thu, 09 Aug 2012 16:15:33 +0100, lipska the kat
>> <lipskathekat [at] yahoo> declaimed the following in
>> gmane.comp.python.general:
>>
>>
>>> in the examples in this chapter we see usage examples for
>>> socketserver.BaseRequestHandler
>>>
>> So far as I can tell, all RequestHandler objects are covered in
>> section "20.19.3 RequestHandler Objects"
>
> Yes, I know, I've read it. Thank you.
>
>> There is no "RequestHandler" class. The section is general to all
>> RequestHandler OBJECTS (Base, Stream, and Datagram).
>
> Yes I know, I've read socketserver.py. Thank you.
> Why do I find myself getting annoyed here ?
>
> This is hard work but I'll try again.
>
> socketserver.RequestHandler is EXPLICITLY documented in section "20.19.3
> RequestHandler Objects" yet does not exist in socketserver.py
> Does this not strike you as odd. I certainly strikes me as odd. Maybe it
> should be socketserver.BaseRequestHandler that is documented here.
>
> The CLASSES socketserver.StreamRequestHandler and
> socketserver.DatagramRequestHandler are DEFINED in socketserver.py
> They are NOT Objects, they are CLASSES yet they are NOT EXPLICITLY
> documented in section 20.19.3 or any other section as far as I can tell.
>
> This is the question I was asking. I am quite capable of extracting the
> slightly obtuse documentation in the section and confirming my
> assumptions by reading the code.
>
> So, I'll try again.
>
> Is there anywhere that documents EXPLICITLY all the publicly visible
> classes in the standard library.
>
> If there is I'd be most grateful if you could point me to it as I can't
> find it
>
> If there isn't how does one go about
> contributing to the documentation.
>
> Thank you for taking the time to reply
>
> lipska
>

Dennis was only trying to help so please don't shout, thanks.

--
Cheers.

Mark Lawrence.

--
http://mail.python.org/mailman/listinfo/python-list


__peter__ at web

Aug 9, 2012, 12:07 PM

Post #5 of 10 (306 views)
Permalink
Re: socketserver.BaseRequestHandler and socketserver.StreamRequestServer docs [In reply to]

lipska the kat wrote:

> If there isn't how does one go about
> contributing to the documentation.

http://docs.python.org/dev/py3k/bugs.html

A similar link should be right there in the footer of the socketserver
documentation.

--
http://mail.python.org/mailman/listinfo/python-list


lipskathekat at yahoo

Aug 9, 2012, 12:20 PM

Post #6 of 10 (303 views)
Permalink
Re: socketserver.BaseRequestHandler and socketserver.StreamRequestServer docs [In reply to]

On 09/08/12 19:55, Mark Lawrence wrote:
> On 09/08/2012 19:37, lipska the kat wrote:
>> On 09/08/12 18:39, Dennis Lee Bieber wrote:
>>> On Thu, 09 Aug 2012 16:15:33 +0100, lipska the kat
>>> <lipskathekat [at] yahoo> declaimed the following in
>>> gmane.comp.python.general:
>>>
>>>
>>>> in the examples in this chapter we see usage examples for
>>>> socketserver.BaseRequestHandler
>>>>
>>> So far as I can tell, all RequestHandler objects are covered in
>>> section "20.19.3 RequestHandler Objects"
>>
>> Yes, I know, I've read it. Thank you.
>
> Dennis was only trying to help so please don't shout, thanks.

I appreciate that he was trying to help but quoting entire sections of
text that I have already stated that I have read is pointless and wastes
everybody's time.

I asked a specific question which he failed to answer.
I also thanked him for his time

lipska

--
Lipska the Kat: Troll hunter, sandbox destroyer
and farscape dreamer of Aeryn Sun
--
http://mail.python.org/mailman/listinfo/python-list


lipskathekat at yahoo

Aug 9, 2012, 12:23 PM

Post #7 of 10 (303 views)
Permalink
Re: socketserver.BaseRequestHandler and socketserver.StreamRequestServer docs [In reply to]

On 09/08/12 20:07, Peter Otten wrote:
> lipska the kat wrote:
>
>> If there isn't how does one go about
>> contributing to the documentation.
>
> http://docs.python.org/dev/py3k/bugs.html
>
> A similar link should be right there in the footer of the socketserver
> documentation.

It is indeed, thank you.

lipska.

--
Lipska the Kat: Troll hunter, sandbox destroyer
and farscape dreamer of Aeryn Sun
--
http://mail.python.org/mailman/listinfo/python-list


tjreedy at udel

Aug 9, 2012, 12:45 PM

Post #8 of 10 (308 views)
Permalink
Re: socketserver.BaseRequestHandler and socketserver.StreamRequestServer docs [In reply to]

On 8/9/2012 1:39 PM, Dennis Lee Bieber wrote:
> On Thu, 09 Aug 2012 16:15:33 +0100, lipska the kat
> <lipskathekat [at] yahoo> declaimed the following in
> gmane.comp.python.general:
>
>
>> in the examples in this chapter we see usage examples for
>> socketserver.BaseRequestHandler
>>
> So far as I can tell, all RequestHandler objects are covered in
> section "20.19.3 RequestHandler Objects"
>
>>
>> In Eclipse I have the entire standard library mounted on an explorer
>> node. When I find socketserver.py I can navigate to the
>> BaseRequestHandler and StreamRequestHandler classes
>> but I can't find the (documented) class [socketserver].RequestHandler
>> class in socketserver.py nor can I find any explicit documentation for
>> the classes socketserver.StreamRequestHandler
>> and socketserver.BaseRequestHandler.
>>
>
> There is no "RequestHandler" class. The section is general to all
> RequestHandler OBJECTS (Base, Stream, and Datagram).
>
> Stream and Datagram request handlers are subclasses of Base, in
> which the setup/finish methods handle the creation/destruction of
> "file-like" attributes -- allowing one to just do read/write operations
> within the core handle() method, instead of having to be concerned with
> the type of connection and performing actual socket recv()/send()
> operations. They are documented in the second paragraph of the .handle()
> method in sectin 20.19.3
>
> In all cases, you are responsible for providing the contents of the
> handle() method.

I think the doc can be improved a bit and opened an issue to "Improve
socketserver doc"
http://bugs.python.org/issue15608

--
Terry Jan Reedy

--
http://mail.python.org/mailman/listinfo/python-list


d at davea

Aug 9, 2012, 12:45 PM

Post #9 of 10 (303 views)
Permalink
Re: socketserver.BaseRequestHandler and socketserver.StreamRequestServer docs [In reply to]

On 08/09/2012 02:37 PM, lipska the kat wrote:
> On 09/08/12 18:39, Dennis Lee Bieber wrote:
>> On Thu, 09 Aug 2012 16:15:33 +0100, lipska the kat
>> <lipskathekat [at] yahoo> declaimed the following in
>> gmane.comp.python.general:
>>
>>
>>> in the examples in this chapter we see usage examples for
>>> socketserver.BaseRequestHandler
>>> <SNIP>
>

I don't know this module at all, so I'll make more generic comments.

> socketserver.RequestHandler is EXPLICITLY documented in section
> "20.19.3 RequestHandler Objects" yet does not exist in socketserver.py
> Does this not strike you as odd. I certainly strikes me as odd. Maybe
> it should be socketserver.BaseRequestHandler that is documented here.
>

The question should not be "is it in socketserver.py," but "does it work
as documented" ? Some of the code is likely in C modules, and thus not
visible in any py file.

> The CLASSES socketserver.StreamRequestHandler and
> socketserver.DatagramRequestHandler are DEFINED in socketserver.py
> They are NOT Objects, they are CLASSES yet they are NOT EXPLICITLY
> documented in section 20.19.3 or any other section as far as I can tell.
>
> <SNIP>

The documentation is for the elements that the library authors expected
and intended people to be able to use. Reasons for not documenting a
particular class or a particular function/method might include the fact
that it's considered obscure, it's unsupported and may not be available
in the future, it's there only for compatibility with an older version
and shouldn't be used in new code, or it's an implementation detail
and/or might not be visible on other platforms. A single leading
underscore should normally be used for that last case.


> Is there anywhere that documents EXPLICITLY all the publicly visible
> classes in the standard library.
>>

Just because it's publicly visible doesn't necessarily mean it's part of
the intended interface.

Now, for this particular module, perhaps none of my arguments apply,
and/or there's a flawed or incomplete documentation.


--

DaveA

--
http://mail.python.org/mailman/listinfo/python-list


lipskathekat at yahoo

Aug 10, 2012, 12:46 AM

Post #10 of 10 (304 views)
Permalink
Re: socketserver.BaseRequestHandler and socketserver.StreamRequestServer docs [In reply to]

On 09/08/12 20:45, Terry Reedy wrote:
> On 8/9/2012 1:39 PM, Dennis Lee Bieber wrote:
>> On Thu, 09 Aug 2012 16:15:33 +0100, lipska the kat
>> <lipskathekat [at] yahoo> declaimed the following in
>> gmane.comp.python.general:
>>
>>
>>> in the examples in this chapter we see usage examples for
>>> socketserver.BaseRequestHandler

[snip]

>
> I think the doc can be improved a bit and opened an issue to "Improve
> socketserver doc"
> http://bugs.python.org/issue15608

Thank you for your reasonable responses
I have sent an email to docs [at] python
politely suggesting a couple of improvements to
the socketserver documentation

lipska

--
Lipska the Kat: Troll hunter, sandbox destroyer
and farscape dreamer of Aeryn Sun
--
http://mail.python.org/mailman/listinfo/python-list

Python python RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.