[issue756982] mailbox should use email not rfc822

2008-05-11 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

Okay, removed that too in r63096.


Tracker <[EMAIL PROTECTED]>


___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue756982] mailbox should use email not rfc822

2008-05-11 Thread Humberto Diogenes

Humberto Diogenes <[EMAIL PROTECTED]> added the comment:

Georg, any special reason for not removing rfc822 references from 
test_mailbox? That section of the patch was not merged.


Tracker <[EMAIL PROTECTED]>


___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue756982] mailbox should use email not rfc822

2008-05-11 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

Removed the last rfc822 reference from 3k's mailbox.py in r63091.

--
resolution:  -> fixed
status: open -> closed


Tracker <[EMAIL PROTECTED]>


___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue756982] mailbox should use email not rfc822

2008-05-11 Thread Humberto Diogenes

Humberto Diogenes <[EMAIL PROTECTED]> added the comment:

> rfc822 is replaced by None in the patch here; is that safe to do?

Yes. That's what mailbox documentation says:

Parameter factory is a callable object that accepts a file-like message 
representation [...] and returns a custom representation. If factory is 
None, MaildirMessage is used as the default message representation.


Tracker <[EMAIL PROTECTED]>


___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue756982] mailbox should use email not rfc822

2008-05-11 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

I removed the old classes in 3k. There remains one usage of rfc822, as
the default "factory" of Maildir. It's replaced by None in the patch
here; is that safe to do?

--
nosy: +georg.brandl


Tracker <[EMAIL PROTECTED]>


___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue756982] mailbox should use email not rfc822

2008-05-11 Thread Humberto Diogenes

Changes by Humberto Diogenes <[EMAIL PROTECTED]>:


Removed file: http://bugs.python.org/file10272/mailbox.py.patch2


Tracker <[EMAIL PROTECTED]>


___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue756982] mailbox should use email not rfc822

2008-05-11 Thread Humberto Diogenes

Changes by Humberto Diogenes <[EMAIL PROTECTED]>:


--
keywords: +patch
Added file: http://bugs.python.org/file10279/mailbox-replace_rfc822.patch


Tracker <[EMAIL PROTECTED]>


___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue756982] mailbox should use email not rfc822

2008-05-10 Thread Humberto Diogenes

Humberto Diogenes <[EMAIL PROTECTED]> added the comment:

I created issue 2814 with a patch to remove those old classes.


Tracker <[EMAIL PROTECTED]>


___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue756982] mailbox should use email not rfc822

2008-05-10 Thread A.M. Kuchling

A.M. Kuchling <[EMAIL PROTECTED]> added the comment:

I think removing those old classes in 3.0 would be very sensible.


Tracker <[EMAIL PROTECTED]>


___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue756982] mailbox should use email not rfc822

2008-05-10 Thread Humberto Diogenes

Humberto Diogenes <[EMAIL PROTECTED]> added the comment:

synx's patch wasn't applying cleanly and broke 2 maildir tests. I'm 
posting one with updated tests and documentation. Still need to get rid of 
rfc822 in test_mailbox, though.

Question: mailbox.py has one section marked as "classes from the original 
module (for backward compatibility)". Shouldn't these be removed in py3k?

--
nosy: +hdiogenes
Added file: http://bugs.python.org/file10272/mailbox.py.patch2


Tracker <[EMAIL PROTECTED]>


___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue756982] mailbox should use email not rfc822

2008-01-20 Thread Christian Heimes

Changes by Christian Heimes:


--
components: +Documentation, Library (Lib) -Extension Modules
keywords: +easy
versions: +Python 2.6, Python 3.0 -Python 2.3


Tracker <[EMAIL PROTECTED]>


___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue756982] mailbox should use email not rfc822

2008-01-09 Thread A.M. Kuchling

Changes by A.M. Kuchling:


--
assignee: barry -> akuchling


Tracker <[EMAIL PROTECTED]>


___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue756982] mailbox should use email not rfc822

2007-11-27 Thread synx

synx added the comment:

I dunno if this is helpful, but in the 2.5 module, it parses mailboxes
into rfc822 messages, but then expects them to be email.Message messages
when unparsing them back to a mailbox. mbox2.add(mbox1.popitem()[1])
fails with rfc822 as the default factory. Since the "factory" is the
only thing still using rfc822, it's easy to remove the use of rfc822
from this module entirely, which also eliminates the parsing/unparsing
disconnect.

--
nosy: +synx
Added file: http://bugs.python.org/file8812/mailbox.py.patch


Tracker <[EMAIL PROTECTED]>

--- mailbox.py	2007-11-27 09:39:25.0 +
+++ mailbox.py	2007-11-27 09:39:17.0 +
@@ -18,7 +18,6 @@
 import email
 import email.Message
 import email.Generator
-import rfc822
 import StringIO
 try:
 if sys.platform == 'os2emx':
@@ -33,6 +32,9 @@
 'BabylMessage', 'MMDFMessage', 'UnixMailbox',
 'PortableUnixMailbox', 'MmdfMailbox', 'MHMailbox', 'BabylMailbox' ]
 
+def defaultFactory(fp):
+	return email.Parser.Parser().parse(fp)
+
 class Mailbox:
 """A group of messages in a particular place."""
 
@@ -225,7 +227,7 @@
 
 colon = ':'
 
-def __init__(self, dirname, factory=rfc822.Message, create=True):
+def __init__(self, dirname, factory=defaultFactory, create=True):
 """Initialize a Maildir instance."""
 Mailbox.__init__(self, dirname, factory, create)
 if not os.path.exists(self._path):
@@ -1906,7 +1908,7 @@
 
 class _Mailbox:
 
-def __init__(self, fp, factory=rfc822.Message):
+def __init__(self, fp, factory=defaultFactory):
 self.fp = fp
 self.seekp = 0
 self.factory = factory
@@ -2023,7 +2025,7 @@
 
 class MHMailbox:
 
-def __init__(self, dirname, factory=rfc822.Message):
+def __init__(self, dirname, factory=defaultFactory):
 import re
 pat = re.compile('^[1-9][0-9]*$')
 self.dirname = dirname
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com