diff options
25 files changed, 99 insertions, 99 deletions
diff --git a/Mailman/docs/acknowledge.txt b/Mailman/docs/acknowledge.txt index f57ed62a3..11847cf17 100644 --- a/Mailman/docs/acknowledge.txt +++ b/Mailman/docs/acknowledge.txt @@ -35,7 +35,7 @@ Non-member posts Non-members can't get acknowledgments of their posts to the mailing list. - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: bperson@example.com ... ... """) diff --git a/Mailman/docs/after-delivery.txt b/Mailman/docs/after-delivery.txt index f5cbfe0e7..50f2e618a 100644 --- a/Mailman/docs/after-delivery.txt +++ b/Mailman/docs/after-delivery.txt @@ -16,7 +16,7 @@ bookkeeping pieces of information are updated. Processing a message with this handler updates the last_post_time and post_id attributes. - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: aperson@example.com ... ... Something interesting. diff --git a/Mailman/docs/archives.txt b/Mailman/docs/archives.txt index cad602634..d1a871ebe 100644 --- a/Mailman/docs/archives.txt +++ b/Mailman/docs/archives.txt @@ -29,7 +29,7 @@ message should /not/ get archived. For example, no digests should ever get archived. >>> mlist.archive = True - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... Subject: A sample message ... ... A message of great import. @@ -64,7 +64,7 @@ archived. Confusingly, this header's value is actually ignored. Even a 'no' value will stop the archiving of the message. - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... Subject: A sample message ... X-No-Archive: No ... @@ -77,7 +77,7 @@ Even a 'no' value will stop the archiving of the message. Another header that's been observed is the X-Archive: header. Here, the header's case folded value must be 'no' in order to prevent archiving. - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... Subject: A sample message ... X-Archive: No ... @@ -89,7 +89,7 @@ header's case folded value must be 'no' in order to prevent archiving. But if the value is 'yes', then the message will be archived. - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... Subject: A sample message ... X-Archive: Yes ... @@ -113,7 +113,7 @@ But if the value is 'yes', then the message will be archived. Without either archiving header, and all other things being the same, the message will get archived. - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... Subject: A sample message ... ... A message of great import. diff --git a/Mailman/docs/bounces.txt b/Mailman/docs/bounces.txt index fa0d44ce9..ad148541b 100644 --- a/Mailman/docs/bounces.txt +++ b/Mailman/docs/bounces.txt @@ -19,7 +19,7 @@ lists can bounce a message with an optional error message. Any message can be bounced. - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... To: _xtest@example.com ... From: aperson@example.com ... Subject: Something important diff --git a/Mailman/docs/cleanse.txt b/Mailman/docs/cleanse.txt index 2e40e6df5..1cb4c2cf8 100644 --- a/Mailman/docs/cleanse.txt +++ b/Mailman/docs/cleanse.txt @@ -16,7 +16,7 @@ for approval. The latter header is used to send a regular message to all members, regardless of whether they get digests or not. Because all three headers contain passwords, they must be removed from any posted message. - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: aperson@example.com ... Approved: foobar ... Approve: barfoo @@ -39,7 +39,7 @@ headers supported by some mail readers. For example, X-PMRC is supported by Pegasus mail. I don't remember what program uses X-Confirm-Reading-To though (Some Microsoft product perhaps?). - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: bperson@example.com ... Reply-To: bperson@example.org ... Sender: asystem@example.net @@ -76,7 +76,7 @@ Hotmail apparently sets X-Originating-Email. >>> mlist.anonymous_list = True >>> mlist.description = u'A Test Mailing List' >>> mlist.preferred_language = u'en' - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: bperson@example.com ... Reply-To: bperson@example.org ... Sender: asystem@example.net diff --git a/Mailman/docs/cook-headers.txt b/Mailman/docs/cook-headers.txt index a6954e5c6..0560373fd 100644 --- a/Mailman/docs/cook-headers.txt +++ b/Mailman/docs/cook-headers.txt @@ -24,7 +24,7 @@ Saving the original sender Because the original sender headers may get deleted or changed, CookHeaders will place the sender in the message metadata for safe keeping. - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: aperson@example.com ... ... A message of great import. @@ -36,7 +36,7 @@ will place the sender in the message metadata for safe keeping. But if there was no original sender, then the empty string will be saved. - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... Subject: No original sender ... ... A message of great import. @@ -54,7 +54,7 @@ The X-BeenThere header is what Mailman uses to recognize messages that have already been processed by this mailing list. It's one small measure against mail loops. - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: aperson@example.com ... ... A message of great import. @@ -66,7 +66,7 @@ mail loops. Mailman appends X-BeenThere headers, so if there already is one in the original message, the posted message will contain two such headers. - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: aperson@example.com ... X-BeenThere: another@example.com ... @@ -82,7 +82,7 @@ Mailman version header Mailman will also insert an X-Mailman-Version header... - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: aperson@example.com ... ... A message of great import. @@ -94,7 +94,7 @@ Mailman will also insert an X-Mailman-Version header... ...but only if one doesn't already exist. - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: aperson@example.com ... X-Mailman-Version: 3000 ... @@ -113,7 +113,7 @@ Mailman will insert a Precedence header, which is a de-facto standard for telling automatic reply software (e.g. vacation(1)) not to respond to this message. - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: aperson@example.com ... ... A message of great import. @@ -126,7 +126,7 @@ message. But Mailman will only add that header if the original message doesn't already have one of them. - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: aperson@example.com ... Precedence: junk ... @@ -160,7 +160,7 @@ These RFCs define headers for mailing list actions. A mailing list should generally add these headers, but not for messages that aren't crafted for a specific list (e.g. password reminders in Mailman 2.x). - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: aperson@example.com ... ... """) @@ -173,7 +173,7 @@ Some people don't like these headers because their mail readers aren't good about hiding them. A list owner can turn these headers off. >>> mlist.include_rfc2369_headers = False - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: aperson@example.com ... ... """) @@ -187,7 +187,7 @@ But normally, a list will include these headers. >>> mlist.include_rfc2369_headers = True >>> mlist.include_list_post_header = True >>> mlist.preferred_language = u'en' - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: aperson@example.com ... ... """) @@ -208,7 +208,7 @@ If the mailing list has a description, then it is included in the List-Id header. >>> mlist.description = u'My test mailing list' - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: aperson@example.com ... ... """) @@ -227,7 +227,7 @@ header. Administrative messages crafted by Mailman will have a reduced set of headers. - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: aperson@example.com ... ... """) @@ -247,7 +247,7 @@ With the normal set of List-* headers, it's still possible to suppress the List-Post header, which is reasonable for an announce only mailing list. >>> mlist.include_list_post_header = False - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: aperson@example.com ... ... """) @@ -268,7 +268,7 @@ List-Archive header either. >>> mlist.include_list_post_header = True >>> mlist.archive = False - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: aperson@example.com ... ... """) @@ -309,7 +309,7 @@ the recipient headers so that users will be able to reply back to the list. >>> from Mailman.interfaces import Personalization, ReplyToMunging >>> mlist.personalize = Personalization.full >>> mlist.reply_goes_to_list = ReplyToMunging.no_munging - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: aperson@example.com ... ... """) diff --git a/Mailman/docs/nntp.txt b/Mailman/docs/nntp.txt index fefddd8b2..586c36266 100644 --- a/Mailman/docs/nntp.txt +++ b/Mailman/docs/nntp.txt @@ -21,7 +21,7 @@ There are several situations which prevent a message from being gatewayed to the newsgroup. The feature could be disabled, as is the default. >>> mlist.gateway_to_news = False - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... Subject: An important message ... ... Something of great import. diff --git a/Mailman/docs/reply-to.txt b/Mailman/docs/reply-to.txt index 537681f93..b6af959ae 100644 --- a/Mailman/docs/reply-to.txt +++ b/Mailman/docs/reply-to.txt @@ -41,7 +41,7 @@ message, the list's posting address simply gets inserted. >>> mlist.reply_goes_to_list = ReplyToMunging.point_to_list >>> mlist.preferred_language = u'en' >>> mlist.description = u'' - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: aperson@example.com ... ... """) @@ -55,7 +55,7 @@ It's also possible to strip any existing Reply-To header first, before adding the list's posting address. >>> mlist.first_strip_reply_to = True - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: aperson@example.com ... Reply-To: bperson@example.com ... @@ -70,7 +70,7 @@ If you don't first strip the header, then the list's posting address will just get appended to whatever the original version was. >>> mlist.first_strip_reply_to = False - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: aperson@example.com ... Reply-To: bperson@example.com ... @@ -89,7 +89,7 @@ The list can also be configured to have an explicit Reply-To header. >>> mlist.reply_goes_to_list = ReplyToMunging.explicit_header >>> mlist.reply_to_address = u'my-list@example.com' - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: aperson@example.com ... ... """) @@ -102,7 +102,7 @@ The list can also be configured to have an explicit Reply-To header. And as before, it's possible to either strip any existing Reply-To header... >>> mlist.first_strip_reply_to = True - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: aperson@example.com ... Reply-To: bperson@example.com ... @@ -116,7 +116,7 @@ And as before, it's possible to either strip any existing Reply-To header... ...or not. >>> mlist.first_strip_reply_to = False - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: aperson@example.com ... Reply-To: bperson@example.com ... diff --git a/Mailman/docs/replybot.txt b/Mailman/docs/replybot.txt index 424fa2944..3f0975b3f 100644 --- a/Mailman/docs/replybot.txt +++ b/Mailman/docs/replybot.txt @@ -33,7 +33,7 @@ will be sent, with 0 meaning "there is no grace period". >>> mlist.autorespond_admin = True >>> mlist.autoresponse_graceperiod = datetime.timedelta() >>> mlist.autoresponse_admin_text = u'admin autoresponse text' - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: aperson@example.com ... To: _xtest-owner@example.com ... @@ -74,7 +74,7 @@ Several headers in the original message determine whether an autoresponse should even be sent. For example, if the message has an "X-Ack: No" header, no auto-response is sent. - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: aperson@example.com ... X-Ack: No ... @@ -87,7 +87,7 @@ no auto-response is sent. Mailman itself can suppress autoresponses for certain types of internally crafted messages, by setting the 'noack' metadata key. - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: mailman@example.com ... ... help for you @@ -99,7 +99,7 @@ crafted messages, by setting the 'noack' metadata key. If there is a Precedence: header with any of the values 'bulk', 'junk', or 'list', then the autoresponse is also suppressed. - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: asystem@example.com ... Precedence: bulk ... @@ -151,7 +151,7 @@ auto-responses: those sent to the -request address... >>> mlist.autorespond_requests = True >>> mlist.autoresponse_request_text = u'robot autoresponse text' - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: aperson@example.com ... To: _xtest-request@example.com ... @@ -180,7 +180,7 @@ auto-responses: those sent to the -request address... >>> mlist.autorespond_postings = True >>> mlist.autoresponse_postings_text = u'postings autoresponse text' - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: aperson@example.com ... To: _xtest@example.com ... diff --git a/Mailman/docs/requests.txt b/Mailman/docs/requests.txt index 6f7dd2f14..40f5e3dfd 100644 --- a/Mailman/docs/requests.txt +++ b/Mailman/docs/requests.txt @@ -212,7 +212,7 @@ For this section, we need a mailing list and at least one message. >>> mlist = config.db.list_manager.create(u'alist@example.com') >>> mlist.preferred_language = u'en' >>> mlist.real_name = u'A Test List' - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: aperson@example.org ... To: alist@example.com ... Subject: Something important @@ -330,7 +330,7 @@ moderator interface to also preserve a copy, essentially telling it not to delete the message from the storage. First, without the switch, the message is deleted. - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: aperson@example.org ... To: alist@example.com ... Subject: Something important diff --git a/Mailman/docs/scrubber.txt b/Mailman/docs/scrubber.txt index 564405378..09d2e26fa 100644 --- a/Mailman/docs/scrubber.txt +++ b/Mailman/docs/scrubber.txt @@ -52,7 +52,7 @@ enabled, the filename will be used when this header attribute is present (yes, this is an unfortunate double negative). >>> config.SCRUBBER_DONT_USE_ATTACHMENT_FILENAME = False - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... Content-Type: image/gif; name="xtest.gif" ... Content-Transfer-Encoding: base64 ... Content-Disposition: attachment; filename="xtest.gif" @@ -81,7 +81,7 @@ Content-Disposition: filename. This is the default for reasons described in the Defaults.py.in file. >>> config.SCRUBBER_DONT_USE_ATTACHMENT_FILENAME = True - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... Content-Type: image/gif; name="xtest.gif" ... Content-Transfer-Encoding: base64 ... Content-Disposition: attachment; filename="xtest.gif" @@ -107,7 +107,7 @@ Scrubbing image attachments When scrubbing image attachments, the original message is modified to include a reference to the attachment file as available through the on-line archive. - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... MIME-Version: 1.0 ... Content-Type: multipart/mixed; boundary="BOUNDARY" ... @@ -182,7 +182,7 @@ Scrubbing text attachments Similar to image attachments, text attachments will also be scrubbed, but the placeholder will be slightly different. - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... MIME-Version: 1.0 ... Content-Type: multipart/mixed; boundary="BOUNDARY" ... diff --git a/Mailman/docs/subject-munging.txt b/Mailman/docs/subject-munging.txt index 12bc098f7..ea11121ad 100644 --- a/Mailman/docs/subject-munging.txt +++ b/Mailman/docs/subject-munging.txt @@ -23,7 +23,7 @@ munging, a mailing list must have a preferred language. >>> mlist.subject_prefix = u'[XTest] ' >>> mlist.preferred_language = u'en' - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: aperson@example.com ... ... A message of great import. @@ -43,7 +43,7 @@ email.header.Header instance which has an unhelpful repr. If the original message had a Subject header, then the prefix is inserted at the beginning of the header's value. - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: aperson@example.com ... Subject: Something important ... @@ -58,7 +58,7 @@ the beginning of the header's value. Subject headers are not munged for digest messages. - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: aperson@example.com ... Subject: Something important ... @@ -71,7 +71,7 @@ Subject headers are not munged for digest messages. Nor are they munged for 'fast tracked' messages, which are generally defined as messages that Mailman crafts internally. - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: aperson@example.com ... Subject: Something important ... @@ -85,7 +85,7 @@ If a Subject header already has a prefix, usually following a Re: marker, another one will not be added but the prefix will be moved to the front of the header text. - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: aperson@example.com ... Subject: Re: [XTest] Something important ... @@ -99,7 +99,7 @@ If the Subjec header has a prefix at the front of the header text, that's where it will stay. This is called 'new style' prefixing and is the only option available in Mailman 3. - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: aperson@example.com ... Subject: [XTest] Re: Something important ... @@ -118,7 +118,7 @@ prefixes. Part of what makes this interesting is the encoding of i18n headers using RFC 2047, and lists whose preferred language is in a different character set than the encoded header. - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... Subject: =?iso-2022-jp?b?GyRCJWEhPCVrJV4lcxsoQg==?= ... ... """) @@ -139,7 +139,7 @@ placeholder to the subject prefix, this post id can be included in the prefix. >>> mlist.subject_prefix = u'[XTest %d] ' >>> mlist.post_id = 456 - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... Subject: Something important ... ... """) @@ -151,7 +151,7 @@ This works even when the message is a reply, except that in this case, the numeric post id in the generated subject prefix is updated with the new post id. - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... Subject: [XTest 123] Re: Something important ... ... """) @@ -162,7 +162,7 @@ id. If the Subject header had old style prefixing, the prefix is moved to the front of the header text. - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... Subject: Re: [XTest 123] Something important ... ... """) @@ -174,7 +174,7 @@ front of the header text. And of course, the proper thing is done when posting id numbers are included in the subject prefix, and the subject is encoded non-ascii. - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... Subject: =?iso-2022-jp?b?GyRCJWEhPCVrJV4lcxsoQg==?= ... ... """) @@ -187,7 +187,7 @@ in the subject prefix, and the subject is encoded non-ascii. Even more fun is when the i18n Subject header already has a prefix, possibly with a different posting number. - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... Subject: [XTest 123] Re: =?iso-2022-jp?b?GyRCJWEhPCVrJV4lcxsoQg==?= ... ... """) @@ -201,7 +201,7 @@ with a different posting number. As before, old style subject prefixes are re-ordered. - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... Subject: Re: [XTest 123] =?iso-2022-jp?b?GyRCJWEhPCVrJV4lcxsoQg==?= ... ... """) @@ -220,7 +220,7 @@ subject. It's because the original is 'crooked'. Note that a Subject starting with '\n ' is generated by some version of Eudora Japanese edition. >>> mlist.subject_prefix = u'[XTest] ' - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... Subject: ... Important message ... @@ -231,7 +231,7 @@ starting with '\n ' is generated by some version of Eudora Japanese edition. And again, with an RFC 2047 encoded header. - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... Subject: ... =?iso-2022-jp?b?GyRCJWEhPCVrJV4lcxsoQg==?= ... diff --git a/Mailman/docs/tagger.txt b/Mailman/docs/tagger.txt index 3792f0f7f..4898eb40e 100644 --- a/Mailman/docs/tagger.txt +++ b/Mailman/docs/tagger.txt @@ -20,7 +20,7 @@ are defined. >>> mlist.topics_enabled = False >>> mlist.topics_bodylines_limit = 0 - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... Subject: foobar ... Keywords: barbaz ... @@ -40,7 +40,7 @@ artifacts of tagging; an X-Topics: header is added with the topic name, and the message metadata gets a key with a list of matching topic names. >>> mlist.topics_enabled = True - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... Subject: foobar ... Keywords: barbaz ... @@ -64,7 +64,7 @@ The tagger can also look at a certain number of body lines, but only for Subject: and Keyword: header-like lines. When set to zero, no body lines are scanned. - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: aperson@example.com ... Subject: nothing ... Keywords: at all @@ -91,7 +91,7 @@ But let the tagger scan a few body lines and the matching headers will be found. >>> mlist.topics_bodylines_limit = 5 - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: aperson@example.com ... Subject: nothing ... Keywords: at all @@ -118,7 +118,7 @@ found. However, scanning stops at the first body line that doesn't look like a header. - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: aperson@example.com ... Subject: nothing ... Keywords: at all @@ -144,7 +144,7 @@ When set to a negative number, all body lines will be scanned. >>> mlist.topics_bodylines_limit = -1 >>> lots_of_headers = '\n'.join(['X-Ignore: zip'] * 100) - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: aperson@example.com ... Subject: nothing ... Keywords: at all @@ -170,7 +170,7 @@ The tagger will also scan the body lines of text subparts in a multipart message, using the same rules as if all those body lines lived in a single text payload. - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... Subject: Was ... Keywords: Raw ... Content-Type: multipart/alternative; boundary="BOUNDARY" @@ -206,7 +206,7 @@ text payload. But the tagger will not descend into non-text parts. - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... Subject: Was ... Keywords: Raw ... Content-Type: multipart/alternative; boundary=BOUNDARY diff --git a/Mailman/queue/docs/runner.txt b/Mailman/queue/docs/runner.txt index 5e5a88d8c..4f6e0dbc1 100644 --- a/Mailman/queue/docs/runner.txt +++ b/Mailman/queue/docs/runner.txt @@ -46,7 +46,7 @@ This is about as simple as a qrunner can be. This qrunner doesn't do much except run once, storing the message and metadata on instance variables. - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: aperson@example.com ... To: _xtest@example.com ... diff --git a/Mailman/queue/docs/switchboard.txt b/Mailman/queue/docs/switchboard.txt index 299aba499..56dbc8a05 100644 --- a/Mailman/queue/docs/switchboard.txt +++ b/Mailman/queue/docs/switchboard.txt @@ -4,7 +4,7 @@ The switchboard The switchboard is subsystem that moves messages between queues. Each instance of a switchboard is responsible for one queue directory. - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: aperson@example.com ... To: _xtest@example.com ... diff --git a/Mailman/rules/docs/administrivia.txt b/Mailman/rules/docs/administrivia.txt index de802fa85..dc9464703 100644 --- a/Mailman/rules/docs/administrivia.txt +++ b/Mailman/rules/docs/administrivia.txt @@ -16,7 +16,7 @@ used to catch messages posted to the list which should have been sent to the For example, if the Subject header contains the word 'unsubscribe', the rule matches. - >>> msg_1 = message_from_string(u"""\ + >>> msg_1 = message_from_string("""\ ... From: aperson@example.com ... Subject: unsubscribe ... @@ -27,7 +27,7 @@ matches. Similarly, if the body of the message contains the word 'subscribe' in the first few lines of text, the rule matches. - >>> msg_2 = message_from_string(u"""\ + >>> msg_2 = message_from_string("""\ ... From: aperson@example.com ... Subject: I wish to join your list ... @@ -51,7 +51,7 @@ requires at least one argument. We don't give that here so the rule will not match. >>> mlist.administrivia = True - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: aperson@example.com ... Subject: confirm ... @@ -61,7 +61,7 @@ match. But a real 'confirm' message will match. - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: aperson@example.com ... Subject: confirm 12345 ... @@ -77,7 +77,7 @@ Non-administrivia Of course, messages that don't contain administrivia, don't match the rule. - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: aperson@example.com ... Subject: examine ... @@ -89,7 +89,7 @@ Of course, messages that don't contain administrivia, don't match the rule. Also, only text/plain parts are checked for administrivia, so any email commands in other content type subparts are ignored. - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: aperson@example.com ... Subject: some administrivia ... Content-Type: text/x-special diff --git a/Mailman/rules/docs/approve.txt b/Mailman/rules/docs/approve.txt index 32367a76b..f942e351a 100644 --- a/Mailman/rules/docs/approve.txt +++ b/Mailman/rules/docs/approve.txt @@ -31,7 +31,7 @@ No approval If the message has no Approve or Approved header, then the rule does not match. - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: aperson@example.com ... ... An important message. @@ -89,7 +89,7 @@ using a 'pseudo-header', which is really just the first non-whitespace line in the payload of the message. If this pseudo-header looks like a matching Approve or Approved header, the message is similarly allowed to pass. - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: aperson@example.com ... ... Approve: abcxyz @@ -111,7 +111,7 @@ The pseudo-header is removed. Similarly for the Approved header. - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: aperson@example.com ... ... Approved: abcxyz @@ -132,7 +132,7 @@ Similarly for the Approved header. As before, a mismatch in the pseudo-header does not approve the message, but the pseudo-header line is still removed. - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: aperson@example.com ... ... Approve: 123456 @@ -152,7 +152,7 @@ the pseudo-header line is still removed. Similarly for the Approved header. - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: aperson@example.com ... ... Approved: 123456 @@ -178,7 +178,7 @@ Mailman searches for the pseudo-header as the first non-whitespace line in the first text/plain message part of the message. This allows the feature to be used with MIME documents. - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: aperson@example.com ... MIME-Version: 1.0 ... Content-Type: multipart/mixed; boundary="AAA" @@ -223,7 +223,7 @@ Like before, the pseudo-header is removed, but only from the text parts. The same goes for the Approved message. - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: aperson@example.com ... MIME-Version: 1.0 ... Content-Type: multipart/mixed; boundary="AAA" @@ -268,7 +268,7 @@ And the header is removed. Here, the correct password is in the non-text/plain part, so it is ignored. - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: aperson@example.com ... MIME-Version: 1.0 ... Content-Type: multipart/mixed; boundary="AAA" @@ -312,7 +312,7 @@ And yet the pseudo-header is still stripped. As before, the same goes for the Approved header. - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: aperson@example.com ... MIME-Version: 1.0 ... Content-Type: multipart/mixed; boundary="AAA" @@ -362,7 +362,7 @@ Because some mail readers will include both a text/plain part and a text/html alternative, the 'approved' rule has to search the alternatives and strip anything that looks like an Approve or Approved headers. - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: aperson@example.com ... MIME-Version: 1.0 ... Content-Type: multipart/mixed; boundary="AAA" @@ -419,7 +419,7 @@ And the header-like text in the text/html part was stripped. This is true even if the rule does not match. - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: aperson@example.com ... MIME-Version: 1.0 ... Content-Type: multipart/mixed; boundary="AAA" diff --git a/Mailman/rules/docs/implicit-dest.txt b/Mailman/rules/docs/implicit-dest.txt index 5a7f06c0c..a43ad40cd 100644 --- a/Mailman/rules/docs/implicit-dest.txt +++ b/Mailman/rules/docs/implicit-dest.txt @@ -15,7 +15,7 @@ mailing list's posting address isn't included in the explicit recipients. >>> mlist.require_explicit_destination = True >>> mlist.acceptable_aliases = u'' - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: aperson@example.org ... Subject: An implicit message ... diff --git a/Mailman/rules/docs/loop.txt b/Mailman/rules/docs/loop.txt index 8fe86cf45..9ed6ca87c 100644 --- a/Mailman/rules/docs/loop.txt +++ b/Mailman/rules/docs/loop.txt @@ -12,7 +12,7 @@ X-BeenThere header with the value of the list's posting address. The header could be missing, in which case the rule does not match. - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: aperson@example.com ... ... An important message. @@ -37,7 +37,7 @@ matches. Even if there are multiple X-BeenThere headers, as long as one with the posting address exists, the rule matches. - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: aperson@example.com ... X-BeenThere: not-this-list@example.com ... X-BeenThere: _xtest@example.com diff --git a/Mailman/rules/docs/max-size.txt b/Mailman/rules/docs/max-size.txt index 0d64b0cf7..03998f564 100644 --- a/Mailman/rules/docs/max-size.txt +++ b/Mailman/rules/docs/max-size.txt @@ -18,7 +18,7 @@ bigger than that will match the rule. >>> mlist.max_message_size = 1 # 1024 bytes >>> one_line = u'x' * 79 >>> big_body = u'\n'.join([one_line] * 15) - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: aperson@example.com ... To: _xtest@example.com ... diff --git a/Mailman/rules/docs/moderation.txt b/Mailman/rules/docs/moderation.txt index cab8f20d3..8d71ffbf1 100644 --- a/Mailman/rules/docs/moderation.txt +++ b/Mailman/rules/docs/moderation.txt @@ -15,7 +15,7 @@ email the list without having those messages be held for approval. The In the simplest case, the sender is not a member of the mailing list, so the moderation rule can't match. - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: aperson@example.org ... To: _xtest@example.com ... Subject: A posted message @@ -60,7 +60,7 @@ If the sender is a member of this mailing list, the rule does not match. But if the sender is not a member of this mailing list, the rule matches. - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: bperson@example.org ... To: _xtest@example.com ... Subject: A posted message diff --git a/Mailman/rules/docs/news-moderation.txt b/Mailman/rules/docs/news-moderation.txt index f32919ce5..8d20ed69a 100644 --- a/Mailman/rules/docs/news-moderation.txt +++ b/Mailman/rules/docs/news-moderation.txt @@ -21,7 +21,7 @@ Set the list configuraiton variable to enable newsgroup moderation. And now all messages will match the rule. - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: aperson@example.org ... Subject: An announcment ... diff --git a/Mailman/rules/docs/no-subject.txt b/Mailman/rules/docs/no-subject.txt index 3627ac03f..78ab22cd6 100644 --- a/Mailman/rules/docs/no-subject.txt +++ b/Mailman/rules/docs/no-subject.txt @@ -12,7 +12,7 @@ the empty string when stripped. A message with a non-empty subject does not match the rule. - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: aperson@example.org ... To: _xtest@example.com ... Subject: A posted message diff --git a/Mailman/rules/docs/recipients.txt b/Mailman/rules/docs/recipients.txt index 21d04b8ae..834c33435 100644 --- a/Mailman/rules/docs/recipients.txt +++ b/Mailman/rules/docs/recipients.txt @@ -13,7 +13,7 @@ number of explicit recipients addressed by the message. In this case, we'll create a message with 5 recipients. These include all addresses in the To and CC headers. - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: aperson@example.com ... To: _xtest@example.com, bperson@example.com ... Cc: cperson@example.com diff --git a/Mailman/rules/docs/suspicious.txt b/Mailman/rules/docs/suspicious.txt index 6b0eeda35..34aed22dc 100644 --- a/Mailman/rules/docs/suspicious.txt +++ b/Mailman/rules/docs/suspicious.txt @@ -14,7 +14,7 @@ confusing to users, and the list attribute that controls this is misnamed. Set the so-called suspicious header configuration variable. >>> mlist.bounce_matching_headers = u'From: .*person@(blah.)?example.com' - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: aperson@example.com ... To: _xtest@example.com ... Subject: An implicit message @@ -26,7 +26,7 @@ Set the so-called suspicious header configuration variable. But if the header doesn't match the regular expression, the rule won't match. This one comes from a .org address. - >>> msg = message_from_string(u"""\ + >>> msg = message_from_string("""\ ... From: aperson@example.org ... To: _xtest@example.com ... Subject: An implicit message |
