New submission from Richard Jones <[EMAIL PROTECTED]>:

Executive summary of the patch:

The attached patch removes the use of __private attributes in the smtpd
module allowing it to be extensible without needing to use the
"_<classname>__<attributename>" hack.


Summary of the patch's changes:

1. removes the unused __conn and __addr attributes
2. renames __server to smtp_server
3. renames __lines to received_lines
4. renames __state to smtp_state
5. renames __greeting to seen_greeting, and alters the default to empty
string to match the anticipated data
6. renames __mailfrom to mailfrom
7. renames __date to received_data
8. renames __fqdn to fqdn
9. removes __peer and uses base class' addr attribute

The existing unit tests contained within test_smtplib pass. Additional
tests could be written if it's deemed necessary.

There is a chance this patch will break backward compatibility with
programs that use the private-variable-access hack. A more complex patch
could be written providing greater compatibility if it's deemed necessary.

----------
components: Library (Lib)
files: smtpd.py-patch
messages: 75132
nosy: richard
severity: normal
status: open
title: Remove use of private attributes in smtpd
versions: Python 2.6
Added file: http://bugs.python.org/file11867/smtpd.py-patch

_______________________________________
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue4184>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to