#756982: Remove rfc822 reference.
This commit is contained in:
parent
2b576d22af
commit
aa5b411b41
|
@ -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
|
A subclass of :class:`Mailbox` for mailboxes in Maildir format. Parameter
|
||||||
*factory* is a callable object that accepts a file-like message representation
|
*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
|
representation. If *create* is ``True``, the mailbox is created if it does not
|
||||||
exist.
|
exist.
|
||||||
|
|
||||||
It is for historical reasons that *factory* defaults to :class:`rfc822.Message`
|
It is for historical reasons that *dirname* is named as such rather than *path*.
|
||||||
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``.
|
|
||||||
|
|
||||||
Maildir is a directory-based mailbox format invented for the qmail mail
|
Maildir is a directory-based mailbox format invented for the qmail mail
|
||||||
transfer agent and now widely supported by other programs. Messages in a
|
transfer agent and now widely supported by other programs. Messages in a
|
||||||
|
|
|
@ -18,7 +18,6 @@ import copy
|
||||||
import email
|
import email
|
||||||
import email.message
|
import email.message
|
||||||
import email.generator
|
import email.generator
|
||||||
import rfc822
|
|
||||||
import io
|
import io
|
||||||
try:
|
try:
|
||||||
if sys.platform == 'os2emx':
|
if sys.platform == 'os2emx':
|
||||||
|
@ -222,7 +221,7 @@ class Maildir(Mailbox):
|
||||||
|
|
||||||
colon = ':'
|
colon = ':'
|
||||||
|
|
||||||
def __init__(self, dirname, factory=rfc822.Message, create=True):
|
def __init__(self, dirname, factory=None, create=True):
|
||||||
"""Initialize a Maildir instance."""
|
"""Initialize a Maildir instance."""
|
||||||
Mailbox.__init__(self, dirname, factory, create)
|
Mailbox.__init__(self, dirname, factory, create)
|
||||||
if not os.path.exists(self._path):
|
if not os.path.exists(self._path):
|
||||||
|
|
Loading…
Reference in New Issue