[Python-3000-checkins] r63091 - in python/branches/py3k: Doc/library/mailbox.rst Lib/mailbox.py

georg.brandl python-3000-checkins at python.org
Sun May 11 22:51:19 CEST 2008


Author: georg.brandl
Date: Sun May 11 22:51:18 2008
New Revision: 63091

Log:
#756982: Remove rfc822 reference.


Modified:
   python/branches/py3k/Doc/library/mailbox.rst
   python/branches/py3k/Lib/mailbox.py

Modified: python/branches/py3k/Doc/library/mailbox.rst
==============================================================================
--- python/branches/py3k/Doc/library/mailbox.rst	(original)
+++ python/branches/py3k/Doc/library/mailbox.rst	Sun May 11 22:51:18 2008
@@ -277,7 +277,7 @@
 ^^^^^^^^^^^^^^^^
 
 
-.. 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 @@
    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

Modified: python/branches/py3k/Lib/mailbox.py
==============================================================================
--- python/branches/py3k/Lib/mailbox.py	(original)
+++ python/branches/py3k/Lib/mailbox.py	Sun May 11 22:51:18 2008
@@ -18,7 +18,6 @@
 import email
 import email.message
 import email.generator
-import rfc822
 import io
 try:
     if sys.platform == 'os2emx':
@@ -222,7 +221,7 @@
 
     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):


More information about the Python-3000-checkins mailing list