From 98c52ea14883f0261fd7a2f2fe8db42d96331ddb Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Mon, 9 Feb 2009 22:19:18 -0500 Subject: Move mailman.Message to mailman.email.Message. Rename Message.get_sender() to Message.sender (property) and Message.get_senders() to Message.senders (another property). The semantics of .sender is slightly different too; it no longer consults config.mailman.use_envelope_sender. Add absolute_import and unicode_literals to Utils.py, and clean up a few imports. --- src/mailman/docs/message.txt | 5 ++--- src/mailman/docs/registration.txt | 24 ++++++++++++------------ 2 files changed, 14 insertions(+), 15 deletions(-) (limited to 'src/mailman/docs') diff --git a/src/mailman/docs/message.txt b/src/mailman/docs/message.txt index dab9ddf0e..704842fe4 100644 --- a/src/mailman/docs/message.txt +++ b/src/mailman/docs/message.txt @@ -12,13 +12,12 @@ When Mailman needs to send a message to a user, it creates a UserNotification instance, and then calls the .send() method on this object. This method requires a mailing list instance. - >>> mlist = config.db.list_manager.create(u'_xtest@example.com') - >>> mlist.preferred_language = u'en' + >>> mlist = create_list(u'_xtest@example.com') The UserNotification constructor takes the recipient address, the sender address, an optional subject, optional body text, and optional language. - >>> from mailman.Message import UserNotification + >>> from mailman.email.message import UserNotification >>> msg = UserNotification( ... 'aperson@example.com', ... '_xtest@example.com', diff --git a/src/mailman/docs/registration.txt b/src/mailman/docs/registration.txt index d243188bc..5f9e0b7fd 100644 --- a/src/mailman/docs/registration.txt +++ b/src/mailman/docs/registration.txt @@ -59,30 +59,30 @@ Some amount of sanity checks are performed on the email address, although honestly, not as much as probably should be done. Still, some patently bad addresses are rejected outright. - >>> registrar.register('') + >>> registrar.register(u'') Traceback (most recent call last): ... - InvalidEmailAddress: '' - >>> registrar.register('some name@example.com') + InvalidEmailAddress: u'' + >>> registrar.register(u'some name@example.com') Traceback (most recent call last): ... - InvalidEmailAddress: 'some name@example.com' - >>> registrar.register('