[Patches] [ python-Patches-1736190 ] asyncore/asynchat patches

SourceForge.net noreply at sourceforge.net
Wed Aug 8 18:09:44 CEST 2007


Patches item #1736190, was opened at 2007-06-12 19:37
Message generated for change (Comment added) made by alanmcintyre
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1736190&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Library (Lib)
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Josiah Carlson (josiahcarlson)
Assigned to: Josiah Carlson (josiahcarlson)
Summary: asyncore/asynchat patches

Initial Comment:
There are a handful of outstanding asyncore/asynchat related bugs in the tracker.  This patch seeks to handle all of the issues with the exception of windows-specific socket errors from 658749 .

In particular, it takes pieces of patches 909005 and 1736101, to address some issues raised there, as well as the bugs: 539444, 760475, 777588, 889153, 953599, 1025525, and 1063924.

In some cases where it could potentially handle fewer exceptions (see the send method), I have opted to handle more of them due to testing actually producing them.

It adds test cases from patch 909005.

It adds two new sample methods to asynchat.async_chat _get_data and _collect_incoming_data to be used as examples for handling incoming buffers.

It removes the simple_producer and fifo classes from asynchat, but accepts work-alikes to the asynchat.async_chat.push_with_producer method.

It further fixes an unreported violated invariant in asynchat.async_chat.handle_read() .

It also produces a useful error message when asyncore.dispatcher.handle_expt_evt is called if the base handle_expt has not been overwritten.


This patch should be applied to the trunk.  The new methods, and removal of the two classes should not be included in patches to 2.5 maintenance (don't add the methods and don't remove the classes).  Basically everything else should work as it did before (with better error handling), unless someone was monkey-patching asyncore.dispatcher.handle_expt .

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

Comment By: Alan McIntyre (alanmcintyre)
Date: 2007-08-08 11:09

Message:
Logged In: YES 
user_id=1115903
Originator: NO

This patch removes two public--and documented--classes from asynchat
(simple_producer and fifo).  Even if the proposed changes to asynchat make
them utterly worthless, I thought it was general policy to deprecate public
items for a release or two before removing them.  Is this the case even
when they're as simple as these two classes?

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

Comment By: billiejoex (billiejoex)
Date: 2007-07-11 10:16

Message:
Logged In: YES 
user_id=1357589
Originator: NO

Good work. I would only rencommend to include documentation for
asyncore.close_all function, actually not documented yet.

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

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


More information about the Patches mailing list