twisted / twisted/twisted

twisted.conch.avatar.ConchUser incompletely implements IConchUser

Open
#3,863 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug conch new priority-normal
Dominant language
Python
Stars
6k
Forks
1.2k
Avg merge
2d 10h
Merged PRs (30d)
10

Description

exarkun's avatar @exarkun reported
Trac ID trac#3863
Type defect
Created 2009-06-01 16:26:05Z

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.

Searchable metadata
trac-id__3863 3863
type__defect defect
reporter__exarkun exarkun
priority__normal normal
milestone__ 
branch__ 
branch_author__ 
status__new new
resolution__None None
component__conch conch
keywords__ 
time__1243873565000000 1243873565000000
changetime__1243873565000000 1243873565000000
version__None None
owner__ 

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at twisted.conch.avatar.ConchUser and the IConchUser interface, then inspect the roughly 20 Conch uses of conn described in the issue. Determine whether the immediate missing attribute is sufficient or whether the interface usage needs redesign; done means ConchUser fully satisfies IConchUser without breaking those connection-manipulation paths.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.