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.

classification
Title: async_chat.__init__() parameters
Type: behavior Stage:
Components: Library (Lib) Versions: Python 2.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: josiahcarlson Nosy List: giampaolo.rodola, josiahcarlson, nadeem.vawda
Priority: normal Keywords:

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:28adminsetgithub: 45860
2008-07-07 05:05:12josiahcarlsonsetstatus: open -> closed
resolution: fixed
messages: + msg69377
2008-02-23 21:07:51akuchlingsetassignee: josiahcarlson
nosy: + josiahcarlson
2007-11-30 16:06:13nadeem.vawdasetfiles: + asynchat.2.patch
messages: + msg57989
2007-11-30 15:53:26giampaolo.rodolasetnosy: + giampaolo.rodola
messages: + msg57988
2007-11-29 14:20:58nadeem.vawdacreate