mirror of https://github.com/python/cpython
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. ........
This commit is contained in:
parent
dc362b0b96
commit
51c6b216cb
|
@ -911,7 +911,7 @@ class MH(Mailbox):
|
||||||
_unlock_file(f)
|
_unlock_file(f)
|
||||||
finally:
|
finally:
|
||||||
f.close()
|
f.close()
|
||||||
for name, key_list in self.get_sequences():
|
for name, key_list in self.get_sequences().iteritems():
|
||||||
if key in key_list:
|
if key in key_list:
|
||||||
msg.add_sequence(name)
|
msg.add_sequence(name)
|
||||||
return msg
|
return msg
|
||||||
|
|
|
@ -936,6 +936,12 @@ class TestMH(TestMailbox):
|
||||||
self._box.remove(key1)
|
self._box.remove(key1)
|
||||||
self.assert_(self._box.get_sequences() == {'flagged':[key0]})
|
self.assert_(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):
|
def test_pack(self):
|
||||||
# Pack the contents of the mailbox
|
# Pack the contents of the mailbox
|
||||||
msg0 = mailbox.MHMessage(self._template % 0)
|
msg0 = mailbox.MHMessage(self._template % 0)
|
||||||
|
|
29
Misc/NEWS
29
Misc/NEWS
|
@ -92,6 +92,35 @@ Core and Builtins
|
||||||
Library
|
Library
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
- Issue 2625: added missing iteritems() call to the for loop in
|
||||||
|
mailbox.MH.get_message().
|
||||||
|
|
||||||
|
- Issue 5585: Add the ability to call an initializer to mulitiprocessing.manager
|
||||||
|
so that users can install custonm handlers/etc.
|
||||||
|
|
||||||
|
- Issue 3551: Patch multiprocessing to raise a proper exception if the size of the
|
||||||
|
object when writefile is called causes a ERROR_NO_SYSTEM_RESOURCES. Added docs
|
||||||
|
to note the limitation
|
||||||
|
|
||||||
|
- unittest.assertNotEqual() now uses the inequality operator (!=) instead
|
||||||
|
of the equality operator.
|
||||||
|
|
||||||
|
- Issue #5663: better failure messages for unittest asserts. Default assertTrue
|
||||||
|
and assertFalse messages are now useful. TestCase has a longMessage attribute.
|
||||||
|
This defaults to False, but if set to True useful error messages are shown in
|
||||||
|
addition to explicit messages passed to assert methods.
|
||||||
|
|
||||||
|
- Issue #3110: Add additional protect around SEM_VALUE_MAX for multiprocessing
|
||||||
|
|
||||||
|
- In Pdb, prevent the reassignment of __builtin__._ by sys.displayhook on
|
||||||
|
printing out values.
|
||||||
|
|
||||||
|
- Issue #4572: added SEEK_* symbolic constants to io module.
|
||||||
|
|
||||||
|
- Issue #1665206 (partially): Move imports in cgitb to the top of the module
|
||||||
|
instead of performing them in functions. Helps prevent import deadlocking in
|
||||||
|
threads.
|
||||||
|
|
||||||
- Issue #5647: MutableSet.__iand__() no longer mutates self during iteration.
|
- Issue #5647: MutableSet.__iand__() no longer mutates self during iteration.
|
||||||
|
|
||||||
- Issue #5619: Multiprocessing children disobey the debug flag and causes
|
- Issue #5619: Multiprocessing children disobey the debug flag and causes
|
||||||
|
|
Loading…
Reference in New Issue