[Twisted-Python] Twisted cred perspective unicode support

Itamar Shtull-Trauring itamar at itamarst.org
Mon Jun 16 18:04:58 EDT 2003

On Mon, 16 Jun 2003 14:51:06 -0700 (PDT)
Brian Warner <warner at lothar.com> wrote:

> > I got problems using Twisted cred with Python2.2.0.
> > My perspectives names are based on a url encoding.
> > I have found that there is a problem when PerspectiveName is 
> > unicode.
> I've committed your fix into CVS, along with some new test cases.
> Thanks for the patch!

The patch should probably be reverted. The perspective name etc. should
always be a string because the storage you use for it may have no notion
of unicode. If you want to use unicode there they should just be UTF-8ed

However, we now have a new cred, so this doesn't really matter. But, you
shouldn't be making *any* changes to old cred if at all possible. Any
uses cases should be made to fit new cred.

In new cred, avatar ids *must* be 8-bit strings. For a username a user
might type in, i.e. credentials, you could write a specific credentials
interface that supports unicode credentials and an associated checker.

Itamar Shtull-Trauring    http://itamarst.org/
http://www.zoteca.com -- Python & Twisted consulting

More information about the Twisted-Python mailing list