Delay string encoding in contrib.auth.hashers
|Reported by:||Claude Paroz||Owned by:||nobody|
|Cc:||Triage Stage:||Ready for checkin|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
As a preparation to switch to more Unicode strings on the road to Python 3, I suggest to encode strings only at the exact moment that we need encoded strings. In contrib.auth.hashers (see patch), this might produce a slightly backwards-incompatible behavior, but should affect very few users (only those having written a custom password hasher and if this hasher does not support Unicode strings).
I'm setting this as RFC, as I'm rather confident about it (all tests pass) and I'm about to push it. But I'd like to offer the time for a quick review or a stop if any strong argument would appear against it.