Opened 14 years ago

Last modified 13 years ago

#740 defect closed fixed (fixed)

twisted.cred.portal.IRealm docstring for parameters

Reported by: thomasvs Owned by:
Priority: high Milestone:
Component: Keywords:
Cc: radix, teratorn, hypatia, thomasvs Branch:


Attachments (1)

issue740.patch (650 bytes) - added by thomasvs 14 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 14 years ago by thomasvs

this docstring is missing argument descriptions.
attaching patch.

Changed 14 years ago by thomasvs

Attachment: issue740.patch added

comment:2 Changed 14 years ago by Jean-Paul Calderone

There should certainly be a docstring for this.  The docstring in this patch
isn't totally accurate though.  cred is useful for more than just pb.  In the
case of a PB realm, the types described in the patch are correct, but in the
case of a realm for any other protocol, they are not.

I'm not sure what a better doc string would look like, but it should cover these

  1) avatarId is generally a string, but not necessarily one.  The realm,
credentials checkers, and client code need to come to an agreement on this

  2) The realm is essentially an application-specific object.  It is often None
and ignored, but when it is necessary for the realm to initiate communications
with the client, rather than (or in addition to) the reverse, it is useful to
create a client object of some sort and pass it as the parameter for the mind.

comment:3 Changed 13 years ago by teratorn

Any progress on this?

comment:4 Changed 13 years ago by radix

exarkun meant to say "mind", not "realm" at the beginning of his point 2.

comment:5 Changed 13 years ago by radix

closing, there are quite sufficient argument descriptions in the docstring 
as it stands. maybe someone added them and forgot to close this

comment:6 Changed 7 years ago by <automation>

Owner: hypatia deleted
Note: See TracTickets for help on using tickets.