[issue4184] Remove use of private attributes in smtpd
report at bugs.python.org
Thu Jul 8 21:47:24 CEST 2010
Giampaolo Rodola' <g.rodola at gmail.com> added the comment:
The patch as-is can't be accepted if not for Python 4.x maybe, obviously because it's just too breaking.
A proper patch would provide aliases for the removed attributes and raise a DeprecationWarning in case they are accessed.
It would be suitable for the the next major release (3.2 at the current time) and the total removal of the deprecated attributes would happen only in 3.3 if not later.
Also, I see no reason in turning public attributes like self.__line, self.__state and self.__greeting.
They should just be private (one underscore) and their name kept the same (e.g. no __server -> smtp_server, __greeting -> seen_greting, etc...).
Finally, tests should definitively be written.
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list