summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-05-11 20:51:18 (GMT)
committerGeorg Brandl <georg@python.org>2008-05-11 20:51:18 (GMT)
commitaa5b411b41978f3835c49850dd567fc284d9aad5 (patch)
tree3ab1a0e461997180ff786b74b4a6a6797a811543
parent2b576d22af93c3fe0f5cae4277d0cd3a4de7c066 (diff)
downloadcpython-aa5b411b41978f3835c49850dd567fc284d9aad5.zip
cpython-aa5b411b41978f3835c49850dd567fc284d9aad5.tar.gz
cpython-aa5b411b41978f3835c49850dd567fc284d9aad5.tar.bz2
#756982: Remove rfc822 reference.
-rw-r--r--Doc/library/mailbox.rst7
-rwxr-xr-xLib/mailbox.py3
2 files changed, 3 insertions, 7 deletions
diff --git a/Doc/library/mailbox.rst b/Doc/library/mailbox.rst
index 6db68ee..e437b7a 100644
--- a/Doc/library/mailbox.rst
+++ b/Doc/library/mailbox.rst
@@ -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
diff --git a/Lib/mailbox.py b/Lib/mailbox.py
index 595f986..38ff0b1 100755
--- a/Lib/mailbox.py
+++ b/Lib/mailbox.py
@@ -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):