]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Actually this was merged by hand because svnmerge messed up the properties
authorR. David Murray <rdmurray@bitdance.com>
Thu, 2 Apr 2009 20:22:29 +0000 (20:22 +0000)
committerR. David Murray <rdmurray@bitdance.com>
Thu, 2 Apr 2009 20:22:29 +0000 (20:22 +0000)
on the merge of revision 71067 presumably as a result of my immediately
previous fix for Brett's fix for his fix....

Merged revisions 71067 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

................
  r71067 | r.david.murray | 2009-04-02 15:44:43 -0400 (Thu, 02 Apr 2009) | 13 lines

  In 3k this becomes an items() call.

  Merged revisions 71046 via svnmerge from
  svn+ssh://pythondev@svn.python.org/python/trunk

  ........
    r71046 | r.david.murray | 2009-04-02 10:05:35 -0400 (Thu, 02 Apr 2009) | 4 lines

    Add missing iteritems() call to the for loop in mailbox.MH.get_message().

    Fixes issue2625.
  ........
................

Lib/mailbox.py
Lib/test/test_mailbox.py
Misc/NEWS

index ab915edea7451f9527fefebafffe1fad54a48f44..909285bd98b18552dc7f2d28c361158c140e70b2 100755 (executable)
@@ -907,7 +907,7 @@ class MH(Mailbox):
                     _unlock_file(f)
         finally:
             f.close()
-        for name, key_list in self.get_sequences():
+        for name, key_list in self.get_sequences().items():
             if key in key_list:
                 msg.add_sequence(name)
         return msg
index 182838118d151256aa231d5857fd210677769814..28b93221691b63be931679dea50f2c0bf3543e07 100644 (file)
@@ -931,6 +931,12 @@ class TestMH(TestMailbox):
         self._box.remove(key1)
         self.assertEqual(self._box.get_sequences(), {'flagged':[key0]})
 
+    def test_issue2625(self):
+        msg0 = mailbox.MHMessage(self._template % 0)
+        msg0.add_sequence('foo')
+        key0 = self._box.add(msg0)
+        refmsg0 = self._box.get_message(key0)
+
     def test_pack(self):
         # Pack the contents of the mailbox
         msg0 = mailbox.MHMessage(self._template % 0)
index 3426a6f73189deb55044e0d3d19bdbe63d630cae..59f9837b5bd72fd43a287e6b76efca51ab7c6385 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -30,6 +30,9 @@ Core and Builtins
 Library
 -------
 
+- Issue 2625: added missing items() call to the for loop in
+  mailbox.MH.get_message().
+
 - Issue #5619: Multiprocessing children disobey the debug flag and causes
   popups on windows buildbots. Patch applied to work around this issue.