Hi list,
I picked up an
optimization from the backlog proposing to move the method normalize_email() from BaseUserManager to AbstractUser, where the email field is defined. The proposal involved a deprecation period for users who rely on the current behavior.
I prepared a
patch, but to get the test suite to pass I had to support the scenario where a subclass of AbstractBaseUser relies on a subclass of UserManager (rather than BaseUserManager) to create objects. If that behavior has to be supported after the deprecation period, I think there is little point in moving normalize_email()--the method belongs on BaseUserManager after all.
So, I'm asking for opinions on these options:
#1 -- Leave normalize_email() on BaseUserManager and close the ticket.
#2 -- Deprecate the behavior where subclasses of AbstractBaseUser rely on UserManager to create objects.
Advice and further guidance welcome.
Jacob