summaryrefslogtreecommitdiff
path: root/Mailman/docs
diff options
context:
space:
mode:
authorBarry Warsaw2007-09-21 08:51:38 -0400
committerBarry Warsaw2007-09-21 08:51:38 -0400
commit65c64773d910b3b2a3e2a9b9db4669e57170ece2 (patch)
tree1bb742b2dc5898e569e19d8967e8d51a5d5c0352 /Mailman/docs
parent892316be3c09eec4a1f8117bfd9eb44bba1c9117 (diff)
downloadmailman-65c64773d910b3b2a3e2a9b9db4669e57170ece2.tar.gz
mailman-65c64773d910b3b2a3e2a9b9db4669e57170ece2.tar.zst
mailman-65c64773d910b3b2a3e2a9b9db4669e57170ece2.zip
OMGW00T: After over a decade, the MailList mixin class is gone! Well,
mostly. It's no longer needed by anything in the test suite, and therefore the list manager returns database MailingList objects directly. The wrapper cruft has been removed. To accomplish this, a couple of hacks were added to the Mailman.app package, which will get cleaned up over time. The MailList module itself (and its few remaining mixins) aren't yet removed from the tree because some of the code is still not tested, and I want to leave this code around until I've finished converting it.
Diffstat (limited to 'Mailman/docs')
-rw-r--r--Mailman/docs/acknowledge.txt2
-rw-r--r--Mailman/docs/bounces.txt5
-rw-r--r--Mailman/docs/cook-headers.txt2
-rw-r--r--Mailman/docs/hold.txt2
-rw-r--r--Mailman/docs/listmanager.txt8
-rw-r--r--Mailman/docs/replybot.txt4
-rw-r--r--Mailman/docs/requests.txt2
-rw-r--r--Mailman/docs/scrubber.txt3
8 files changed, 12 insertions, 16 deletions
diff --git a/Mailman/docs/acknowledge.txt b/Mailman/docs/acknowledge.txt
index e9242fb45..3e2088f10 100644
--- a/Mailman/docs/acknowledge.txt
+++ b/Mailman/docs/acknowledge.txt
@@ -15,7 +15,7 @@ acknowledgment.
>>> mlist.preferred_language = 'en'
>>> # XXX This will almost certainly change once we've worked out the web
>>> # space layout for mailing lists now.
- >>> mlist._data.web_page_url = 'http://lists.example.com/'
+ >>> mlist.web_page_url = 'http://lists.example.com/'
>>> flush()
>>> # Ensure that the virgin queue is empty, since we'll be checking this
diff --git a/Mailman/docs/bounces.txt b/Mailman/docs/bounces.txt
index aa1639e5a..cfc7aa49e 100644
--- a/Mailman/docs/bounces.txt
+++ b/Mailman/docs/bounces.txt
@@ -37,7 +37,8 @@ to the original messageauthor.
>>> from Mailman.Queue.Switchboard import Switchboard
>>> switchboard = Switchboard(config.VIRGINQUEUE_DIR)
- >>> mlist.bounce_message(msg)
+ >>> from Mailman.app.bounces import bounce_message
+ >>> bounce_message(mlist, msg)
>>> len(switchboard.files)
1
>>> filebase = switchboard.files[0]
@@ -77,7 +78,7 @@ passed in as an instance of a RejectMessage exception.
>>> from Mailman.Errors import RejectMessage
>>> error = RejectMessage("This wasn't very important after all.")
- >>> mlist.bounce_message(msg, error)
+ >>> bounce_message(mlist, msg, error)
>>> len(switchboard.files)
1
>>> filebase = switchboard.files[0]
diff --git a/Mailman/docs/cook-headers.txt b/Mailman/docs/cook-headers.txt
index 4f8885e79..ffe2dfa5f 100644
--- a/Mailman/docs/cook-headers.txt
+++ b/Mailman/docs/cook-headers.txt
@@ -18,7 +18,7 @@ is getting sent through the system. We'll take things one-by-one.
>>> mlist.archive = True
>>> # XXX This will almost certainly change once we've worked out the web
>>> # space layout for mailing lists now.
- >>> mlist._data.web_page_url = 'http://lists.example.com/'
+ >>> mlist.web_page_url = 'http://lists.example.com/'
>>> flush()
diff --git a/Mailman/docs/hold.txt b/Mailman/docs/hold.txt
index 62b621bdc..3aeb56934 100644
--- a/Mailman/docs/hold.txt
+++ b/Mailman/docs/hold.txt
@@ -16,7 +16,7 @@ are held when they meet any of a number of criteria.
>>> mlist.real_name = '_XTest'
>>> # XXX This will almost certainly change once we've worked out the web
>>> # space layout for mailing lists now.
- >>> mlist._data.web_page_url = 'http://lists.example.com/'
+ >>> mlist.web_page_url = 'http://lists.example.com/'
>>> flush()
Here's a helper function used when we don't care about what's in the virgin
diff --git a/Mailman/docs/listmanager.txt b/Mailman/docs/listmanager.txt
index 1f4586e35..030f2ecd5 100644
--- a/Mailman/docs/listmanager.txt
+++ b/Mailman/docs/listmanager.txt
@@ -61,14 +61,6 @@ Use the list manager to delete a mailing list.
>>> sorted(listmgr.names)
[]
-Attempting to access attributes of the deleted mailing list raises an
-exception:
-
- >>> mlist.fqdn_listname
- Traceback (most recent call last):
- ...
- AttributeError: fqdn_listname
-
After deleting the list, you can create it again.
>>> mlist = listmgr.create('_xtest@example.com')
diff --git a/Mailman/docs/replybot.txt b/Mailman/docs/replybot.txt
index 2db4e4b07..0b1980fde 100644
--- a/Mailman/docs/replybot.txt
+++ b/Mailman/docs/replybot.txt
@@ -13,6 +13,7 @@ message or the amount of time since the last auto-response.
>>> from Mailman.database import flush
>>> mlist = config.db.list_manager.create('_xtest@example.com')
>>> mlist.real_name = 'XTest'
+ >>> mlist.web_page_url = 'http://www.example.com/'
>>> flush()
>>> # Ensure that the virgin queue is empty, since we'll be checking this
@@ -32,8 +33,9 @@ is sent to one of these addresses. A mailing list also has an autoresponse
grace period which describes how much time must pass before a second response
will be sent, with 0 meaning "there is no grace period".
+ >>> import datetime
>>> mlist.autorespond_admin = True
- >>> mlist.autoresponse_graceperiod = 0
+ >>> mlist.autoresponse_graceperiod = datetime.timedelta()
>>> mlist.autoresponse_admin_text = 'admin autoresponse text'
>>> flush()
>>> msg = message_from_string("""\
diff --git a/Mailman/docs/requests.txt b/Mailman/docs/requests.txt
index e513b7cea..249cab952 100644
--- a/Mailman/docs/requests.txt
+++ b/Mailman/docs/requests.txt
@@ -451,7 +451,7 @@ queue when the message is held.
>>> mlist.admin_immed_notify = True
>>> # XXX This will almost certainly change once we've worked out the web
>>> # space layout for mailing lists now.
- >>> mlist._data.web_page_url = 'http://www.example.com/'
+ >>> mlist.web_page_url = 'http://www.example.com/'
>>> flush()
>>> id_4 = moderator.hold_subscription(mlist,
... 'cperson@example.org', 'Claire Person',
diff --git a/Mailman/docs/scrubber.txt b/Mailman/docs/scrubber.txt
index 344894666..0c8c4d94f 100644
--- a/Mailman/docs/scrubber.txt
+++ b/Mailman/docs/scrubber.txt
@@ -19,7 +19,8 @@ Helper functions for getting the attachment data.
>>> import os, re
>>> def read_attachment(filename, remove=True):
- ... path = os.path.join(mlist.archive_dir(), filename)
+ ... path = os.path.join(config.PRIVATE_ARCHIVE_FILE_DIR,
+ ... mlist.fqdn_listname, filename)
... fp = open(path)
... try:
... data = fp.read()