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 djarb
Recipients djarb, giampaolo.rodola, josiah.carlson
Date 2007-12-13.14:34:52
SpamBayes Score 0.001541624
Marked as misclassified No
Message-id <1197556494.09.0.656924357642.issue1563@psf.upfronthosting.co.za>
In-reply-to
Content
Certainly, I'll attach the complete asyncore and asynchat files. I had a
similar problem making heads or tails of the patch that Giampaolo
pointed out to me.

Regarding the "changes for changes sake" argument, I have two responses. 

First, it's perfectly reasonable to use the Dec 10th "asynchat.diff"
file, in which I made no significant changes, aside from the addition of
an adapter that would turn an iterator into a producer (rather than vice
versa). That patch just fixes the problems I was tasked with. It's still
a fairly large patch, but it consists entirely of trivial chunks.

Second, after applying Giampaolo's patch, I felt rather more free to fix
things, since that was what that patch did. Most of those changes you're
complaining about come from there. My own additions were as follows: I
created a default collect_incoming_data, which implements the common
usage case. This will not alter behavior for old implementations. I
applied name mangling to the internal names of async_chat, so as to
prevent children from accidentally stepping on the names (which causes
weird bugs that can be a pain to figure out). This also will not alter
behavior for existing implementations, unless they were doing something
very odd indeed. I replaced producers with iterators, and adjusted
initiate_send to fit. I did that because producers have been redundant
in Python ever since iterators were introduced, and doubly so since
generators. This makes it possible to easily and efficiently do things
like place an itertools.ifilter on the outgoing fifo, etc. It's more
flexible, and has better compatibility with the rest of the standard
library. Again, this change doesn't alter or remove existing
functionality, it just changes the way it's implemented.

Regarding the correct way to port Giampaolo's patches, I followed a
similar course, though I didn't stop there.
Files
File name Uploaded
aggregate.zip djarb, 2007-12-13.14:34:52
History
Date User Action Args
2007-12-13 14:34:54djarbsetspambayes_score: 0.00154162 -> 0.001541624
recipients: + djarb, giampaolo.rodola, josiah.carlson
2007-12-13 14:34:54djarbsetspambayes_score: 0.00154162 -> 0.00154162
messageid: <1197556494.09.0.656924357642.issue1563@psf.upfronthosting.co.za>
2007-12-13 14:34:54djarblinkissue1563 messages
2007-12-13 14:34:52djarbcreate