Xavier de Gaye added the comment: Attached are two test cases for this patch.
test_simple_producer still fails with the new patch because it should be: self.producer_fifo.extendleft([first, data]) instead of: self.producer_fifo.appendleft([data, first]) The order of the items in the list is reversed, as documented in deque.extendleft. So the attachment also includes the corrected patch with this single change. I still think that if num_sent == 0, then 'first' should be put back in the queue. This means that initiate_send should not attempt anymore to send an empty string, which is confusing anyway, and therefore at the beginning of initiate_send, when 'if not first', then we should return in all cases and not only when 'first' is None. ---------- Added file: http://bugs.python.org/file30574/cpython.asyncore_2.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue17925> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com