twisted.conch.avatar.ConchUser incompletely implements IConchUser

[email protected]
Newsgroups gmane.comp.python.twisted.bugs
Message-ID <[email protected]>
New submission from exarkun <[email protected]>:

`ConchUser` declares that it implements `IConchUser`, but it doesn't provide the `conn` attribute.

I find the `conn` attribute to be a somewhat questionable member of this interface.  My understanding of its use is that some part of the connection/channel/session/whatever setup will at some point ''set'' a value for this attribute on the user.  The user is then allowed to use the value of the attribute to do things.  Additionally, a few (well, 20 or so) places in Conch seem to assume that they will be able to retrieve the value of this attribute (unchanged, I believe) in order to do their own connection manipulation.

For the former of these use cases, a `setConnection` method of some sort would seem to make more sense.  For the latter of these use cases, not relying on the avatar object to faithfully regurgitate this information might be better (though I am not familiar enough with the code in question to suggest exactly how this might be done).

Resolving the immediate problem probably just involves adding a `conn` attribute to `ConchUser` (initialized to `None` or some such), though.


----------
Type     : defect
Component: conch
Keywords : 
Priority : normal
Nosy     : 
----------
http://twistedmatrix.com/trac/ticket/3863
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.