summaryrefslogtreecommitdiff
path: root/src/mailman/commands/docs
diff options
context:
space:
mode:
authorBarry Warsaw2011-01-01 11:28:29 -0500
committerBarry Warsaw2011-01-01 11:28:29 -0500
commit3f1f5a2826feb9c5fb202ae266ba7f0ff76ebe21 (patch)
tree1bab06750e306942180b18383c06ad2804f98677 /src/mailman/commands/docs
parentd0f8e9e03d3c55641165b73a4d8971ec514a9cdc (diff)
downloadmailman-3f1f5a2826feb9c5fb202ae266ba7f0ff76ebe21.tar.gz
mailman-3f1f5a2826feb9c5fb202ae266ba7f0ff76ebe21.tar.zst
mailman-3f1f5a2826feb9c5fb202ae266ba7f0ff76ebe21.zip
Because it was just to damn confusing, rename IAddress.address to
IAddress.email and IAddress.original_address to IAddress.original_email. From now on we'll use "address" to talk about the IAddress object and "email" to talk about the textual email address.
Diffstat (limited to 'src/mailman/commands/docs')
-rw-r--r--src/mailman/commands/docs/create.txt16
-rw-r--r--src/mailman/commands/docs/members.txt46
-rw-r--r--src/mailman/commands/docs/membership.txt2
3 files changed, 40 insertions, 24 deletions
diff --git a/src/mailman/commands/docs/create.txt b/src/mailman/commands/docs/create.txt
index 70fb44d8f..31663a851 100644
--- a/src/mailman/commands/docs/create.txt
+++ b/src/mailman/commands/docs/create.txt
@@ -77,8 +77,8 @@ Setting the owner
By default, no list owners are specified.
- >>> print list(mlist.owners.addresses)
- []
+ >>> dump_list(mlist.owners.addresses)
+ *Empty*
But you can specify an owner address on the command line when you create the
mailing list.
@@ -91,8 +91,8 @@ mailing list.
Created mailing list: test4@example.com
>>> mlist = list_manager.get('test4@example.com')
- >>> print list(mlist.owners.addresses)
- [<Address: foo@example.org [not verified] at ...>]
+ >>> dump_list(repr(address) for address in mlist.owners.addresses)
+ <Address: foo@example.org [not verified] at ...>
You can even specify more than one address for the owners.
::
@@ -104,10 +104,10 @@ You can even specify more than one address for the owners.
>>> mlist = list_manager.get('test5@example.com')
>>> from operator import attrgetter
- >>> print sorted(mlist.owners.addresses, key=attrgetter('address'))
- [<Address: bar@example.net [not verified] at ...>,
- <Address: baz@example.net [not verified] at ...>,
- <Address: foo@example.net [not verified] at ...>]
+ >>> dump_list(repr(address) for address in mlist.owners.addresses)
+ <Address: bar@example.net [not verified] at ...>
+ <Address: baz@example.net [not verified] at ...>
+ <Address: foo@example.net [not verified] at ...>
Setting the language
diff --git a/src/mailman/commands/docs/members.txt b/src/mailman/commands/docs/members.txt
index 602e1bbe5..18a916781 100644
--- a/src/mailman/commands/docs/members.txt
+++ b/src/mailman/commands/docs/members.txt
@@ -205,8 +205,6 @@ need a file containing email addresses and full names that can be parsed by
::
>>> mlist2 = create_list('test2@example.com')
- >>> addresses = [
- ... ]
>>> import os
>>> path = os.path.join(config.VAR_DIR, 'addresses.txt')
@@ -221,8 +219,11 @@ need a file containing email addresses and full names that can be parsed by
>>> args.listname = [mlist2.fqdn_listname]
>>> command.process(args)
- >>> sorted(address.address for address in mlist2.members.addresses)
- [u'aperson@example.com', u'bperson@example.com', u'cperson@example.com']
+ >>> from operator import attrgetter
+ >>> dump_list(mlist2.members.addresses, key=attrgetter('email'))
+ aperson@example.com
+ Bart Person <bperson@example.com>
+ Cate Person <cperson@example.com>
You can also specify ``-`` as the filename, in which case the addresses are
taken from standard input.
@@ -244,9 +245,13 @@ taken from standard input.
>>> command.process(args)
>>> sys.stdin = sys.__stdin__
- >>> sorted(address.address for address in mlist2.members.addresses)
- [u'aperson@example.com', u'bperson@example.com', u'cperson@example.com',
- u'dperson@example.com', u'eperson@example.com', u'fperson@example.com']
+ >>> dump_list(mlist2.members.addresses, key=attrgetter('email'))
+ aperson@example.com
+ Bart Person <bperson@example.com>
+ Cate Person <cperson@example.com>
+ dperson@example.com
+ Elly Person <eperson@example.com>
+ Fred Person <fperson@example.com>
Blank lines and lines that begin with '#' are ignored.
::
@@ -262,10 +267,15 @@ Blank lines and lines that begin with '#' are ignored.
>>> args.input_filename = path
>>> command.process(args)
- >>> sorted(address.address for address in mlist2.members.addresses)
- [u'aperson@example.com', u'bperson@example.com', u'cperson@example.com',
- u'dperson@example.com', u'eperson@example.com', u'fperson@example.com',
- u'gperson@example.com', u'iperson@example.com']
+ >>> dump_list(mlist2.members.addresses, key=attrgetter('email'))
+ aperson@example.com
+ Bart Person <bperson@example.com>
+ Cate Person <cperson@example.com>
+ dperson@example.com
+ Elly Person <eperson@example.com>
+ Fred Person <fperson@example.com>
+ gperson@example.com
+ iperson@example.com
Addresses which are already subscribed are ignored, although a warning is
printed.
@@ -282,10 +292,16 @@ printed.
Already subscribed (skipping): gperson@example.com
Already subscribed (skipping): aperson@example.com
- >>> sorted(address.address for address in mlist2.members.addresses)
- [u'aperson@example.com', u'bperson@example.com', u'cperson@example.com',
- u'dperson@example.com', u'eperson@example.com', u'fperson@example.com',
- u'gperson@example.com', u'iperson@example.com', u'jperson@example.com']
+ >>> dump_list(mlist2.members.addresses, key=attrgetter('email'))
+ aperson@example.com
+ Bart Person <bperson@example.com>
+ Cate Person <cperson@example.com>
+ dperson@example.com
+ Elly Person <eperson@example.com>
+ Fred Person <fperson@example.com>
+ gperson@example.com
+ iperson@example.com
+ jperson@example.com
Displaying members
diff --git a/src/mailman/commands/docs/membership.txt b/src/mailman/commands/docs/membership.txt
index 3d611a160..0da7ffadf 100644
--- a/src/mailman/commands/docs/membership.txt
+++ b/src/mailman/commands/docs/membership.txt
@@ -281,7 +281,7 @@ to unsubscribe Anne from the alpha mailing list.
>>> print unicode(results)
The results of your email command are provided below.
<BLANKLINE>
- Invalid or unverified address: anne.person@example.org
+ Invalid or unverified email address: anne.person@example.org
<BLANKLINE>
>>> print mlist.members.get_member('anne@example.com')