[issue13311] asyncore handle_read should call recv

2011-11-04 Thread Charles-François Natali
Charles-François Natali added the comment: > Since this patch may break existing valid code, I think it should be > closed as invalid. Yes. Since the benefit is not clear and it may break existing code, it's probably wiser. -- resolution: -> rejected stage: patch review -> committed/

[issue13311] asyncore handle_read should call recv

2011-11-03 Thread Xavier de Gaye
Xavier de Gaye added the comment: > In this kind of situation, it is perfectly legitimate for the client > to perform a half-duplex close (shutdown(SHUT_WR)), since it does > not intend to send data (which is implied by the fact that the sever > doesn't implement an handle_read() method). > Wit

[issue13311] asyncore handle_read should call recv

2011-11-03 Thread Charles-François Natali
Charles-François Natali added the comment: > The attached patch adds a call to recv in handle_read, updates the > documentation and adds a test case. In this kind of situation, it is perfectly legitimate for the client to perform a half-duplex close (shutdown(SHUT_WR)), since it does not inten

[issue13311] asyncore handle_read should call recv

2011-11-03 Thread Xavier de Gaye
Xavier de Gaye added the comment: > I'd say your patch can be useful only in case the dispatcher subclass > doesn't send() neither recv() any data, in which case the connection > is supposed to remain open forever. There are some cases where it is important to detect that the remote end is disc

[issue13311] asyncore handle_read should call recv

2011-11-03 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: > When the remote end disconnects, handle_close is only called if recv > is called (from handle_read). Actually this isn't true; handle_close() is also called in send(): http://hg.python.org/cpython/file/eb2991f7cdc8/Lib/asyncore.py#l364 I'd say your patch

[issue13311] asyncore handle_read should call recv

2011-11-02 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +giampaolo.rodola, josiahcarlson, neologix, stutzbach stage: -> patch review versions: +Python 3.2 ___ Python tracker ___ __

[issue13311] asyncore handle_read should call recv

2011-11-01 Thread Xavier de Gaye
New submission from Xavier de Gaye : When the remote end disconnects, handle_close is only called if recv is called (from handle_read). The default implementation of handle_read does not call recv. Not having the default implementation of handle_read call recv, has the following drawbacks: