Issue 4277: asynchat's handle_error inconsistency (original) (raw)

Created on 2008-11-07 12:14 by giampaolo.rodola, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
asynchat.patch giampaolo.rodola,2008-11-07 12:14 review
Messages (5)
msg75601 - (view) Author: Giampaolo Rodola' (giampaolo.rodola) * (Python committer) Date: 2008-11-07 12:14
Suppose you have tow sockets handled by two asynchat.async_chat class instances and from class1 you want to send some data through class2: class1(asynchat.async_chat): ... def mymethod(self): class2_instance.push_with_producer(producer) Since push_with_producer automatically calls initiate_send() if an error occurs while class2 reads the first chunk of data from the producer, class1's handle_error gets called. If the error occurs when reading the next chunks of data class2's handle_error will be called instead. This is an inconsistency that should be fixed so that always class2's handle_error gets called. The patch in attachment does that.
msg140534 - (view) Author: Nir Soffer (nirs) * Date: 2011-07-17 19:07
The idea is good, but seems that error handling should be inlined into initiate_send. Also those 3 special exceptions should be defined once in the module instead of repeating them.
msg225996 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2014-08-27 15:51
This issue is 6 years old. I don't understand the bug and the patch has no unit test. I suggest to close the issue as out of date. The asynchat module is now deprecated in favor of the new shiny asyncio module.
msg226090 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2014-08-29 21:55
#6550 and #11267 have been closed as out of date as asynchat and asyncore are effectively deprecated in favour of asyncio so can't this go the same way?
msg395893 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2021-06-15 18:50
asynchat has been deprecated for a long time, it's unlikely we will do anything with it now.
History
Date User Action Args
2022-04-11 14:56:41 admin set github: 48527
2021-06-15 18:50:50 iritkatriel set status: open -> closednosy: + iritkatrielmessages: + resolution: out of datestage: test needed -> resolved
2019-05-02 04:14:40 josiahcarlson set nosy: - josiahcarlson, josiah.carlson
2019-04-26 20:31:01 BreamoreBoy set nosy: - BreamoreBoy
2014-08-29 21:55:50 BreamoreBoy set nosy: + BreamoreBoymessages: +
2014-08-29 20:38:24 terry.reedy set versions: + Python 3.4, Python 3.5, - Python 3.1, Python 3.2
2014-08-27 15:51:15 vstinner set nosy: + vstinnermessages: +
2011-07-17 19:07:12 nirs set nosy: + nirsmessages: +
2010-07-10 11:22:36 giampaolo.rodola set assignee: giampaolo.rodola
2010-07-10 09:37:33 BreamoreBoy set stage: test neededversions: + Python 3.1, Python 3.2, - Python 3.0
2009-03-28 12:14:54 intgr set nosy: + intgr
2008-11-07 12:17:53 giampaolo.rodola set versions: + Python 3.0
2008-11-07 12:14:52 giampaolo.rodola create