Miksus/red-mail

Rename user_name to username

lifeitech opened this issue · 1 comments

Rename user_name to username in EmailSender class may be better.

I think I agree that this would be better: username is more common in the context of credentials and authentication. The reason for user_name was simply that this was the first thing to come to my mind and was an unimportant choice back then due to more urgent problems.

However, as practically everything depends on this behaviour, this should be done with care. I think for 0.4 we could have username as an alias for user_name and use properties to keep the user_name as an attribute if someone already depends on that. And just raise a future warning for user_name.

The additional keyword arguments are passed to the SMTP initiation but I think it's safe to assume related classes won't have username as an argument and that someone would depend on that behaviour.

In short, I agree with you but we need to be extra careful with this