Opened 3 years ago

Closed 3 years ago

#18405 closed Cleanup/optimization (fixed)

Delay string encoding in contrib.auth.hashers

Reported by: claudep Owned by: nobody
Component: contrib.auth Version: master
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


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 claudep 3 years ago.
Delayed string encoding in hashers

Download all attachments as: .zip

Change History (2)

Changed 3 years ago by claudep

Delayed string encoding in hashers

comment:1 Changed 3 years ago by claudep

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.
Back to Top