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 josiahcarlson
Recipients ajaksu2, akuchling, alexer, anadelonbrin, brett.cannon, giampaolo.rodola, gregory.p.smith, josiahcarlson, tim.peters
Date 2009-03-31.16:30:27
SpamBayes Score 8.59044e-08
Marked as misclassified No
Message-id <1238517033.32.0.406839671109.issue1161031@psf.upfronthosting.co.za>
In-reply-to
Content
Your analysis WRT handle_expt_event() is correct.  I've been meaning to 
fix that for a while, but I forgot to do it in 2.6/3.0 with all of the 
other changes/fixes.  Looking at the docs, you are also right about 
POLLNVAL.

I also don't *know* what to do when presented with POLLERR, but few 
socket errors are transient (transient errors should be handled by the 
underlying stacks), so I agree with you that they should just be closed.

I went ahead and made the changes as you have suggested, and also made 
the same change with the select-based loop.  Errors on the socket just 
result in closing the socket, resulting in _exception() -> close().

Thinking about it, I've also had a change of heart, and added a 
frozenset object called 'ignore_log_types', which specifies the log 
types to ignore.  By default it is populated with 'warning', which 
squelches all currently existing "unhandled * event" bits.  If you use 
self.log(arg) or self.log_info(one_arg), those lines are unchanged.  
Handle_error() uses the "error" type, which is also nice, but which you 
can also suppress with ease (though you really should be logging them so 
you can fix your code).

I've attached a version that I think is pretty reasonable.  Comments?  
Questions?
History
Date User Action Args
2009-03-31 16:30:33josiahcarlsonsetrecipients: + josiahcarlson, tim.peters, akuchling, brett.cannon, gregory.p.smith, anadelonbrin, giampaolo.rodola, ajaksu2, alexer
2009-03-31 16:30:33josiahcarlsonsetmessageid: <1238517033.32.0.406839671109.issue1161031@psf.upfronthosting.co.za>
2009-03-31 16:30:32josiahcarlsonlinkissue1161031 messages
2009-03-31 16:30:29josiahcarlsoncreate