File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -281,6 +281,10 @@ def __getnewargs__(self):
281281 'Return self as a plain tuple. Used by copy and pickle.'
282282 return tuple(self)
283283
284+ def __getstate__(self):
285+ 'Exclude the OrderedDict from pickling'
286+ return None
287+
284288{field_defs}
285289'''
286290
Original file line number Diff line number Diff line change @@ -273,6 +273,7 @@ def test_pickle(self):
273273 q = loads (dumps (p , protocol ))
274274 self .assertEqual (p , q )
275275 self .assertEqual (p ._fields , q ._fields )
276+ self .assertNotIn (b'OrderedDict' , dumps (p , protocol ))
276277
277278 def test_copy (self ):
278279 p = TestNT (x = 10 , y = 20 , z = 30 )
Original file line number Diff line number Diff line change @@ -811,6 +811,7 @@ Trent Mick
811811Jason Michalski
812812Franck Michea
813813Tom Middleton
814+ Thomas Miedema
814815Stan Mihai
815816Stefan Mihaila
816817Aristotelis Mikropoulos
Original file line number Diff line number Diff line change @@ -47,6 +47,9 @@ Library
4747- Issue #17802: Fix an UnboundLocalError in html.parser. Initial tests by
4848 Thomas Barlow.
4949
50+ - Issue #15535: Fix namedtuple pickles which were picking up the OrderedDict
51+ instead of just the underlying tuple.
52+
5053- Issue #17192: Restore the patch for Issue #11729 which was ommitted in
5154 3.3.1 when updating the bundled version of libffi used by ctypes. Update
5255 many libffi files that were missed in 3.3.1's update to libffi-3.0.13.
You can’t perform that action at this time.
0 commit comments