From d9ad19e86ff658a74870fb488cd74e5002b63bc3 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Sat, 18 Jul 2009 22:31:45 -0400 Subject: De-u-literal-ify our doctests. --- src/mailman/docs/chains.txt | 11 +++-- src/mailman/docs/languages.txt | 4 +- src/mailman/docs/lifecycle.txt | 2 +- src/mailman/docs/pending.txt | 2 +- src/mailman/docs/pipelines.txt | 2 +- src/mailman/docs/registration.txt | 64 ++++++++++++------------ src/mailman/docs/requests.txt | 68 +++++++++++++------------- src/mailman/docs/styles.txt | 37 +++++++------- src/mailman/docs/usermanager.txt | 21 ++++---- src/mailman/docs/users.txt | 56 +++++++++++---------- src/mailman/pipeline/docs/ack-headers.txt | 5 +- src/mailman/pipeline/docs/acknowledge.txt | 21 ++++---- src/mailman/pipeline/docs/after-delivery.txt | 3 +- src/mailman/pipeline/docs/archives.txt | 3 +- src/mailman/pipeline/docs/avoid-duplicates.txt | 13 ++--- src/mailman/pipeline/docs/calc-recips.txt | 25 +++++----- src/mailman/pipeline/docs/cleanse.txt | 9 ++-- src/mailman/pipeline/docs/cook-headers.txt | 53 ++++++++++---------- src/mailman/pipeline/docs/decorate.txt | 64 ++++++++++++------------ src/mailman/pipeline/docs/file-recips.txt | 13 ++--- src/mailman/pipeline/docs/filtering.txt | 23 ++++----- src/mailman/pipeline/docs/nntp.txt | 13 ++--- src/mailman/pipeline/docs/reply-to.txt | 39 ++++++++------- src/mailman/pipeline/docs/replybot.txt | 19 +++---- src/mailman/pipeline/docs/scrubber.txt | 29 +++++------ src/mailman/pipeline/docs/subject-munging.txt | 31 ++++++------ src/mailman/pipeline/docs/tagger.txt | 19 +++---- src/mailman/pipeline/docs/to-outgoing.txt | 3 +- src/mailman/queue/docs/archiver.txt | 3 +- src/mailman/queue/docs/command.txt | 9 ++-- src/mailman/queue/docs/digester.txt | 21 ++++---- src/mailman/queue/docs/incoming.txt | 23 ++++----- src/mailman/queue/docs/lmtp.txt | 9 ++-- src/mailman/queue/docs/news.txt | 15 +++--- src/mailman/queue/docs/outgoing.txt | 15 +++--- src/mailman/queue/docs/runner.txt | 7 +-- src/mailman/rest/docs/domains.txt | 20 ++++---- src/mailman/rules/docs/administrivia.txt | 5 +- src/mailman/rules/docs/approve.txt | 23 ++++----- src/mailman/rules/docs/emergency.txt | 3 +- src/mailman/rules/docs/header-matching.txt | 5 +- src/mailman/rules/docs/implicit-dest.txt | 17 ++++--- src/mailman/rules/docs/loop.txt | 5 +- src/mailman/rules/docs/max-size.txt | 7 +-- src/mailman/rules/docs/moderation.txt | 7 +-- src/mailman/rules/docs/news-moderation.txt | 3 +- src/mailman/rules/docs/no-subject.txt | 5 +- src/mailman/rules/docs/recipients.txt | 3 +- src/mailman/rules/docs/rules.txt | 7 +-- src/mailman/rules/docs/suspicious.txt | 5 +- src/mailman/styles/default.py | 2 +- src/mailman/tests/test_documentation.py | 5 +- 52 files changed, 461 insertions(+), 415 deletions(-) (limited to 'src') diff --git a/src/mailman/docs/chains.txt b/src/mailman/docs/chains.txt index 186590a93..3fee28e7d 100644 --- a/src/mailman/docs/chains.txt +++ b/src/mailman/docs/chains.txt @@ -1,3 +1,4 @@ +====== Chains ====== @@ -10,7 +11,7 @@ processing of messages. The Discard chain ------------------ +================= The Discard chain simply throws the message away. @@ -50,7 +51,7 @@ The Discard chain simply throws the message away. The Reject chain ----------------- +================ The Reject chain bounces the message back to the original sender, and logs this action. @@ -95,7 +96,7 @@ The bounce message is now sitting in the Virgin queue. The Hold Chain --------------- +============== The Hold chain places the message into the admin request database and depending on the list's settings, sends a notification to both the original @@ -248,7 +249,7 @@ The message itself is held in the message store. The Accept chain ----------------- +================ The Accept chain sends the message on the 'prep' queue, where it will be processed and sent on to the list membership. @@ -282,7 +283,7 @@ processed and sent on to the list membership. Run-time chains ---------------- +=============== We can also define chains at run time, and these chains can be mutated. Run-time chains are made up of links where each link associates both a rule diff --git a/src/mailman/docs/languages.txt b/src/mailman/docs/languages.txt index 87c68f034..77b51cbeb 100644 --- a/src/mailman/docs/languages.txt +++ b/src/mailman/docs/languages.txt @@ -49,7 +49,7 @@ You can iterate over all the known language codes. >>> mgr.add('pl', 'iso-8859-2', 'Polish') >>> sorted(mgr.codes) - ['en', 'it', 'pl'] + [u'en', u'it', u'pl'] You can iterate over all the known languages. @@ -76,7 +76,7 @@ You can get a particular language by its code. >>> print mgr['xx'].code Traceback (most recent call last): ... - KeyError: 'xx' + KeyError: u'xx' >>> print mgr.get('it').description Italian >>> print mgr.get('xx') diff --git a/src/mailman/docs/lifecycle.txt b/src/mailman/docs/lifecycle.txt index 8f45dc880..e6dcc7c33 100644 --- a/src/mailman/docs/lifecycle.txt +++ b/src/mailman/docs/lifecycle.txt @@ -28,7 +28,7 @@ bogus posting address, you get an exception. >>> create_list('not a valid address') Traceback (most recent call last): ... - InvalidEmailAddress: 'not a valid address' + InvalidEmailAddress: u'not a valid address' If the posting address is valid, but the domain has not been registered with Mailman yet, you get an exception. diff --git a/src/mailman/docs/pending.txt b/src/mailman/docs/pending.txt index abfba4885..5d7706bf6 100644 --- a/src/mailman/docs/pending.txt +++ b/src/mailman/docs/pending.txt @@ -38,7 +38,7 @@ basically means returning the IPendable structure (as a dict) from the database that matches the token. If the token isn't in the database, None is returned. - >>> pendable = pendingdb.confirm('missing') + >>> pendable = pendingdb.confirm(bytes('missing')) >>> print pendable None >>> pendable = pendingdb.confirm(token) diff --git a/src/mailman/docs/pipelines.txt b/src/mailman/docs/pipelines.txt index 36bf2dd23..5ad6ba243 100644 --- a/src/mailman/docs/pipelines.txt +++ b/src/mailman/docs/pipelines.txt @@ -10,7 +10,7 @@ rules and chains, there is no way to stop a pipeline from processing the message once it's started. >>> from mailman.app.lifecycle import create_list - >>> mlist = create_list(u'xtest@example.com') + >>> mlist = create_list('xtest@example.com') >>> print mlist.pipeline built-in >>> from mailman.core.pipelines import process diff --git a/src/mailman/docs/registration.txt b/src/mailman/docs/registration.txt index 519b81ba8..ff6466f82 100644 --- a/src/mailman/docs/registration.txt +++ b/src/mailman/docs/registration.txt @@ -17,7 +17,7 @@ stuff. >>> from mailman.interfaces.domain import IDomainManager >>> manager = IDomainManager(config) - >>> domain = manager[u'example.com'] + >>> domain = manager['example.com'] Get a registrar by adapting a domain. @@ -51,27 +51,27 @@ 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(u'') + >>> registrar.register('') Traceback (most recent call last): ... InvalidEmailAddress: u'' - >>> registrar.register(u'some name@example.com') + >>> registrar.register('some name@example.com') Traceback (most recent call last): ... InvalidEmailAddress: u'some name@example.com' - >>> registrar.register(u'