]> granicus.if.org Git - python/commitdiff
#756982: Remove rfc822 reference.
authorGeorg Brandl <georg@python.org>
Sun, 11 May 2008 20:51:18 +0000 (20:51 +0000)
committerGeorg Brandl <georg@python.org>
Sun, 11 May 2008 20:51:18 +0000 (20:51 +0000)
Doc/library/mailbox.rst
Lib/mailbox.py

index 6db68ee2fcdad74f9d97729e08c3790b367513a0..e437b7a5d0dfe150b629cd0b6909f8b3cc4d5667 100644 (file)
@@ -277,7 +277,7 @@ Maildir, mbox, MH, Babyl, and MMDF.
 ^^^^^^^^^^^^^^^^
 
 
-.. class:: Maildir(dirname[, factory=rfc822.Message[, create=True]])
+.. class:: Maildir(dirname[, factory=None[, create=True]])
 
    A subclass of :class:`Mailbox` for mailboxes in Maildir format. Parameter
    *factory* is a callable object that accepts a file-like message representation
@@ -286,10 +286,7 @@ Maildir, mbox, MH, Babyl, and MMDF.
    representation. If *create* is ``True``, the mailbox is created if it does not
    exist.
 
-   It is for historical reasons that *factory* defaults to :class:`rfc822.Message`
-   and that *dirname* is named as such rather than *path*. For a :class:`Maildir`
-   instance that behaves like instances of other :class:`Mailbox` subclasses, set
-   *factory* to ``None``.
+   It is for historical reasons that *dirname* is named as such rather than *path*.
 
    Maildir is a directory-based mailbox format invented for the qmail mail
    transfer agent and now widely supported by other programs. Messages in a
index 595f986fd9a0f3ea95885226eaa89ab3060e0b8e..38ff0b1eb74bed456f2bd677c56ff2c4a628481f 100755 (executable)
@@ -18,7 +18,6 @@ import copy
 import email
 import email.message
 import email.generator
-import rfc822
 import io
 try:
     if sys.platform == 'os2emx':
@@ -222,7 +221,7 @@ class Maildir(Mailbox):
 
     colon = ':'
 
-    def __init__(self, dirname, factory=rfc822.Message, create=True):
+    def __init__(self, dirname, factory=None, create=True):
         """Initialize a Maildir instance."""
         Mailbox.__init__(self, dirname, factory, create)
         if not os.path.exists(self._path):