Opened 12 years ago

Closed 12 years ago

#18405 closed Cleanup/optimization (fixed)

Delay string encoding in contrib.auth.hashers

Reported by: Claude Paroz Owned by: nobody
Component: contrib.auth Version: dev
Severity: Normal Keywords: python3
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

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.

Attachments (1)

hashers.diff (4.5 KB ) - added by Claude Paroz 12 years ago.
Delayed string encoding in hashers

Download all attachments as: .zip

Change History (2)

by Claude Paroz, 12 years ago

Attachment: hashers.diff added

Delayed string encoding in hashers

comment:1 by Claude Paroz, 12 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.
Back to Top