Issue 1519: async_chat.init() parameters - Python tracker (original) (raw)

Created on 2007-11-29 14:20 by nadeem.vawda, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
asynchat.patch nadeem.vawda,2007-11-29 14:20
asynchat.2.patch nadeem.vawda,2007-11-30 16:06
Messages (4)
msg57930 - (view) Author: Nadeem Vawda (nadeem.vawda) * (Python committer) Date: 2007-11-29 14:20
The __init__() function for asynchat.async_chat doesn't allow the caller to specify a channel map. I thought it would make sense to add an optional 'map' parameter, for consistency with asyncore.dispatcher. If the parameter is not specified, asyncore.dispatcher.__init__() will default to using the global map, which is the current behaviour.
msg57988 - (view) Author: Giampaolo Rodola' (giampaolo.rodola) * (Python committer) Date: 2007-11-30 15:53
+1. Another inconsistency are the argument names used in __init__ methods, one called "sock" and the other called "conn": asyncore: def __init__(self, sock=None, map=None): asynchat: def __init__ (self, conn=None):
msg57989 - (view) Author: Nadeem Vawda (nadeem.vawda) * (Python committer) Date: 2007-11-30 16:06
Thanks for pointing that out; I've uploaded a second patch that changes async_chat.__init__() to use 'sock' instead of 'conn'. This change shouldn't affect anything either, since the argument is simply passed to asyncore.dispatcher.__init__().
msg69377 - (view) Author: Josiah Carlson (josiahcarlson) * (Python triager) Date: 2008-07-07 05:05
Fixed for 2.6 in changelist 64768. Fixed for 3.0 in changelist 64770.
History
Date User Action Args
2022-04-11 14:56:28 admin set github: 45860
2008-07-07 05:05:12 josiahcarlson set status: open -> closedresolution: fixedmessages: +
2008-02-23 21:07:51 akuchling set assignee: josiahcarlsonnosy: + josiahcarlson
2007-11-30 16:06:13 nadeem.vawda set files: + asynchat.2.patchmessages: +
2007-11-30 15:53:26 giampaolo.rodola set nosy: + giampaolo.rodolamessages: +
2007-11-29 14:20:58 nadeem.vawda create