diff -r 29bdbcadf299 Lib/collections.py --- a/Lib/collections.py Thu Aug 02 03:00:33 2012 +0300 +++ b/Lib/collections.py Fri Aug 31 21:53:47 2012 +0200 @@ -271,6 +271,10 @@ raise ValueError('Got unexpected field names: %r' % kwds.keys()) return result + def __getstate__(self): + # Prevent pickle protocol 0 from also dumping an OrderedDict. + return None + def __getnewargs__(self): 'Return self as a plain tuple. Used by copy and pickle.' return tuple(self) diff -r 29bdbcadf299 Lib/test/test_collections.py --- a/Lib/test/test_collections.py Thu Aug 02 03:00:33 2012 +0300 +++ b/Lib/test/test_collections.py Fri Aug 31 21:53:47 2012 +0200 @@ -169,6 +169,8 @@ q = loads(dumps(p, protocol)) self.assertEqual(p, q) self.assertEqual(p._fields, q._fields) + self.assertNotIn('OrderedDict', pickle.dumps(p, 0)) + self.assertNotIn('OrderedDict', cPickle.dumps(p, 0)) def test_copy(self): p = TestNT(x=10, y=20, z=30) @@ -191,6 +193,7 @@ T = namedtuple('T', 'x', verbose=True) words = set(re.findall('[A-Za-z]+', template.getvalue())) words -= set(keyword.kwlist) + words -= {'None'} T = namedtuple('T', words) # test __new__ values = tuple(range(len(words))) diff -r 29bdbcadf299 Misc/ACKS --- a/Misc/ACKS Thu Aug 02 03:00:33 2012 +0300 +++ b/Misc/ACKS Fri Aug 31 21:53:47 2012 +0200 @@ -577,6 +577,7 @@ Steven Miale Trent Mick Tom Middleton +Thomas Miedema Stan Mihai Aristotelis Mikropoulos Damien Miller