diff options
Diffstat (limited to 'src/mailman/commands/docs')
| -rw-r--r-- | src/mailman/commands/docs/echo.rst | 2 | ||||
| -rw-r--r-- | src/mailman/commands/docs/help.rst | 8 | ||||
| -rw-r--r-- | src/mailman/commands/docs/info.rst | 29 | ||||
| -rw-r--r-- | src/mailman/commands/docs/inject.rst | 10 | ||||
| -rw-r--r-- | src/mailman/commands/docs/members.rst | 5 | ||||
| -rw-r--r-- | src/mailman/commands/docs/membership.rst | 18 | ||||
| -rw-r--r-- | src/mailman/commands/docs/qfile.rst | 7 | ||||
| -rw-r--r-- | src/mailman/commands/docs/withlist.rst | 4 |
8 files changed, 39 insertions, 44 deletions
diff --git a/src/mailman/commands/docs/echo.rst b/src/mailman/commands/docs/echo.rst index 32399ebfc..6412a4afe 100644 --- a/src/mailman/commands/docs/echo.rst +++ b/src/mailman/commands/docs/echo.rst @@ -24,7 +24,7 @@ The original message is ignored, but the results receive the echoed command. >>> from mailman.email.message import Message >>> print(command.process(mlist, Message(), {}, ('foo', 'bar'), results)) ContinueProcessing.yes - >>> print(unicode(results)) + >>> print(str(results)) The results of your email command are provided below. <BLANKLINE> echo foo bar diff --git a/src/mailman/commands/docs/help.rst b/src/mailman/commands/docs/help.rst index bbd6c8c09..5330a0b79 100644 --- a/src/mailman/commands/docs/help.rst +++ b/src/mailman/commands/docs/help.rst @@ -25,7 +25,7 @@ short description of each of them. >>> from mailman.email.message import Message >>> print(help.process(mlist, Message(), {}, (), results)) ContinueProcessing.yes - >>> print(unicode(results)) + >>> print(results) The results of your email command are provided below. <BLANKLINE> confirm - Confirm a subscription request. @@ -44,19 +44,19 @@ With an argument, you can get more detailed help about a specific command. >>> results = Results() >>> print(help.process(mlist, Message(), {}, ('help',), results)) ContinueProcessing.yes - >>> print(unicode(results)) + >>> print(results) The results of your email command are provided below. <BLANKLINE> help [command] Get help about available email commands. <BLANKLINE> - + Some commands have even more detailed help. >>> results = Results() >>> print(help.process(mlist, Message(), {}, ('join',), results)) ContinueProcessing.yes - >>> print(unicode(results)) + >>> print(results) The results of your email command are provided below. <BLANKLINE> join [digest=<no|mime|plain>] diff --git a/src/mailman/commands/docs/info.rst b/src/mailman/commands/docs/info.rst index 8bc7579e6..6ce223403 100644 --- a/src/mailman/commands/docs/info.rst +++ b/src/mailman/commands/docs/info.rst @@ -62,20 +62,21 @@ definition. Python ... ... File system paths: - ARCHIVE_DIR = /var/lib/mailman/archives - BIN_DIR = /sbin - DATA_DIR = /var/lib/mailman/data - ETC_DIR = /etc - EXT_DIR = /etc/mailman.d - LIST_DATA_DIR = /var/lib/mailman/lists - LOCK_DIR = /var/lock/mailman - LOCK_FILE = /var/lock/mailman/master.lck - LOG_DIR = /var/log/mailman - MESSAGES_DIR = /var/lib/mailman/messages - PID_FILE = /var/run/mailman/master.pid - QUEUE_DIR = /var/spool/mailman - TEMPLATE_DIR = .../mailman/templates - VAR_DIR = /var/lib/mailman + ARCHIVE_DIR = /var/lib/mailman/archives + BIN_DIR = /sbin + CFG_FILE = .../test.cfg + DATA_DIR = /var/lib/mailman/data + ETC_DIR = /etc + EXT_DIR = /etc/mailman.d + LIST_DATA_DIR = /var/lib/mailman/lists + LOCK_DIR = /var/lock/mailman + LOCK_FILE = /var/lock/mailman/master.lck + LOG_DIR = /var/log/mailman + MESSAGES_DIR = /var/lib/mailman/messages + PID_FILE = /var/run/mailman/master.pid + QUEUE_DIR = /var/spool/mailman + TEMPLATE_DIR = .../mailman/templates + VAR_DIR = /var/lib/mailman .. _`Filesystem Hierarchy Standard`: http://www.pathname.com/fhs/ diff --git a/src/mailman/commands/docs/inject.rst b/src/mailman/commands/docs/inject.rst index 63e7b0366..de295b8f6 100644 --- a/src/mailman/commands/docs/inject.rst +++ b/src/mailman/commands/docs/inject.rst @@ -94,7 +94,7 @@ By default, the incoming queue is used. >>> dump_msgdata(items[0].msgdata) _parsemsg : False - listname : test@example.com + listid : test.example.com original_size: 203 version : 3 @@ -122,7 +122,7 @@ But a different queue can be specified on the command line. >>> dump_msgdata(items[0].msgdata) _parsemsg : False - listname : test@example.com + listid : test.example.com original_size: 203 version : 3 @@ -133,7 +133,7 @@ Standard input The message text can also be provided on standard input. :: - >>> from StringIO import StringIO + >>> from six import StringIO # Remember: we've got unicode literals turned on. >>> standard_in = StringIO(str("""\ @@ -167,7 +167,7 @@ The message text can also be provided on standard input. >>> dump_msgdata(items[0].msgdata) _parsemsg : False - listname : test@example.com + listid : test.example.com original_size: 211 version : 3 @@ -195,7 +195,7 @@ injected. _parsemsg : False bar : two foo : one - listname : test@example.com + listid : test.example.com original_size: 203 version : 3 diff --git a/src/mailman/commands/docs/members.rst b/src/mailman/commands/docs/members.rst index 7b99e92f9..28f238f31 100644 --- a/src/mailman/commands/docs/members.rst +++ b/src/mailman/commands/docs/members.rst @@ -229,15 +229,14 @@ You can also specify ``-`` as the filename, in which case the addresses are taken from standard input. :: - >>> from StringIO import StringIO + >>> from six import StringIO >>> fp = StringIO() - >>> fp.encoding = 'us-ascii' >>> for address in ('dperson@example.com', ... 'Elly Person <eperson@example.com>', ... 'fperson@example.com (Fred Person)', ... ): ... print(address, file=fp) - >>> fp.seek(0) + >>> filepos = fp.seek(0) >>> import sys >>> sys.stdin = fp diff --git a/src/mailman/commands/docs/membership.rst b/src/mailman/commands/docs/membership.rst index aa3ab97e6..a260e930a 100644 --- a/src/mailman/commands/docs/membership.rst +++ b/src/mailman/commands/docs/membership.rst @@ -45,7 +45,7 @@ If that's missing though, then an error is returned. >>> from mailman.email.message import Message >>> print(join.process(mlist, Message(), {}, (), results)) ContinueProcessing.no - >>> print(unicode(results)) + >>> print(results) The results of your email command are provided below. <BLANKLINE> join: No valid address found to subscribe @@ -60,7 +60,7 @@ The ``subscribe`` command is an alias. >>> results = Results() >>> print(subscribe.process(mlist, Message(), {}, (), results)) ContinueProcessing.no - >>> print(unicode(results)) + >>> print(results) The results of your email command are provided below. <BLANKLINE> subscribe: No valid address found to subscribe @@ -79,7 +79,7 @@ When the message has a From field, that address will be subscribed. >>> results = Results() >>> print(join.process(mlist, msg, {}, (), results)) ContinueProcessing.yes - >>> print(unicode(results)) + >>> print(results) The results of your email command are provided below. <BLANKLINE> Confirmation email sent to Anne Person <anne@example.com> @@ -150,7 +150,7 @@ list. >>> results = Results() >>> print(confirm.process(mlist, msg, {}, (token,), results)) ContinueProcessing.yes - >>> print(unicode(results)) + >>> print(results) The results of your email command are provided below. <BLANKLINE> Confirmed @@ -208,7 +208,7 @@ list. >>> results = Results() >>> print(confirm.process(mlist_2, msg, {}, (token,), results)) ContinueProcessing.yes - >>> print(unicode(results)) + >>> print(results) The results of your email command are provided below. <BLANKLINE> Confirmed @@ -241,7 +241,7 @@ is sent a confirmation message for her request. >>> results = Results() >>> print(leave.process(mlist_2, msg, {}, (), results)) ContinueProcessing.yes - >>> print(unicode(results)) + >>> print(results) The results of your email command are provided below. <BLANKLINE> Anne Person <anne@example.com> left baker@example.com @@ -278,7 +278,7 @@ to unsubscribe Anne from the alpha mailing list. >>> print(leave.process(mlist, msg, {}, (), results)) ContinueProcessing.no - >>> print(unicode(results)) + >>> print(results) The results of your email command are provided below. <BLANKLINE> Invalid or unverified email address: anne.person@example.org @@ -299,7 +299,7 @@ unsubscribe her from the list. >>> print(leave.process(mlist, msg, {}, (), results)) ContinueProcessing.yes - >>> print(unicode(results)) + >>> print(results) The results of your email command are provided below. <BLANKLINE> Anne Person <anne.person@example.org> left alpha@example.com @@ -354,7 +354,7 @@ a user of the system. >>> print(confirm.process(mlist, msg, {}, (token,), results)) ContinueProcessing.yes - >>> print(unicode(results)) + >>> print(results) The results of your email command are provided below. <BLANKLINE> Confirmed diff --git a/src/mailman/commands/docs/qfile.rst b/src/mailman/commands/docs/qfile.rst index 8ec0a3952..e097ebf97 100644 --- a/src/mailman/commands/docs/qfile.rst +++ b/src/mailman/commands/docs/qfile.rst @@ -47,7 +47,6 @@ Once we've figured out the file name of the shunted message, we can print it. >>> command.process(FakeArgs) [----- start pickle -----] <----- start object 1 -----> - From nobody ... From: aperson@example.com To: test@example.com Subject: Uh oh @@ -55,11 +54,7 @@ Once we've figured out the file name of the shunted message, we can print it. I borkeded Mailman. <BLANKLINE> <----- start object 2 -----> - { u'_parsemsg': False, - 'bad': u'yes', - 'bar': u'baz', - 'foo': 7, - u'version': 3} + {'_parsemsg': False, 'bad': 'yes', 'bar': 'baz', 'foo': 7, 'version': 3} [----- end pickle -----] Maybe we don't want to print the contents of the file though, in case we want diff --git a/src/mailman/commands/docs/withlist.rst b/src/mailman/commands/docs/withlist.rst index e915eb04c..321b6e68a 100644 --- a/src/mailman/commands/docs/withlist.rst +++ b/src/mailman/commands/docs/withlist.rst @@ -52,10 +52,10 @@ single argument, the mailing list. >>> with open(os.path.join(config.VAR_DIR, 'showme.py'), 'w') as fp: ... print("""\ ... def showme(mailing_list): - ... print "The list's name is", mailing_list.fqdn_listname + ... print("The list's name is", mailing_list.fqdn_listname) ... ... def displayname(mailing_list): - ... print "The list's display name is", mailing_list.display_name + ... print("The list's display name is", mailing_list.display_name) ... """, file=fp) If the name of the function is the same as the module, then you only need to |
