-
-
Notifications
You must be signed in to change notification settings - Fork 31.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
asyncore/asynchat patches #45089
Comments
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 . |
Good work. I would only rencommend to include documentation for asyncore.close_all function, actually not documented yet. |
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? |
We can leave those two classes in, even though I have never seen them used or subclassed. In Python 3.x, we can remove them without issue. |
The current implementation of asynchat.async_chat.initiate_send method Note that this only happens when sending the data by using a producer
...the newer version just calls self.send using the entire data as
What is specified in ac_out_buffer_size when using a producer is just |
In attachment I provide a patch for fixing this last mentioned issue. |
I've discussed a lot with Josiah via e-mail and this is the updated The test suite has passed on Windows XP using Python 2.6 alpha 1. |
Are there news about this issue? |
In attachment the Josiah Carlson's patch who currently seems to have |
This is separate from bpo-1563, right? |
Yes. |
FWIW, I've added Giampaolo's latest patch to Rietveld: Review comments added there should automatically be CC'ed here. |
Dear report@bugs.python.org, New code review comments by gvanrossum@gmail.com have been published. Message: Details: http://codereview.appspot.com/744/diff/1/22 http://codereview.appspot.com/744/diff/1/22#newcode226 Issue Description: Sincerely, Your friendly code review daemon (http://codereview.appspot.com/). |
Dear GvR, report, New code review comments by josiah.carlson have been published. Message: Details: http://codereview.appspot.com/744/diff/1/22 http://codereview.appspot.com/744/diff/1/22#newcode226
No problem. Any other comments? Issue Description: Sincerely, Your friendly code review daemon (http://codereview.appspot.com/). |
Committed to trunk a bit ago, will be in 3.0 this weekend. |
This issue should be closed. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: