wushuyi / passlib

Automatically exported from code.google.com/p/passlib
Other
0 stars 0 forks source link

Enable 3.x unicode behavior under 2.x #20

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Passlib currently returns unicode strings under 3.x, and bytes under 2.x, as 
detailed at 
http://packages.python.org/passlib/password_hash_api.html#unicode-behavior

It might prove useful for some applications to get unicode returned even under 
2.x, especially if they are already unicode aware. This should be relatively 
easy, by adding a global flag to change the behavior of utils.to_hash_str() and 
a few other routines. Would just add complication to the unittesting. 

Might be worth adding at some point, especially if a request crops up.

Original issue reported on code.google.com by elic@astllc.org on 15 Aug 2011 at 9:31

GoogleCodeExporter commented 9 years ago
Though I dislike the idea of a flag which changes global library behavior... 
could instead have set on a per-context basis, such as adding a 
`context__hash_encoding` parameter to CryptPolicy. Will have to revisit this 
towards end of 1.6 dev cycle.

Original comment by elic@astllc.org on 31 Aug 2011 at 11:10

GoogleCodeExporter commented 9 years ago

Original comment by elic@astllc.org on 12 Sep 2011 at 2:20

GoogleCodeExporter commented 9 years ago

Original comment by elic@astllc.org on 13 Mar 2012 at 4:29

GoogleCodeExporter commented 9 years ago
After some consideration and study of how larger frameworks like Django are 
handling things, I've decided the utility of this feature is outweighed by the 
maintenance burden.

Original comment by elic@astllc.org on 23 Dec 2013 at 4:10