new = marshal.loads(marshal.dumps(co))
self.assertEqual(co, new)
+ def test_many_codeobjects(self):
+ # Issue2957: bad recursion count on code objects
+ count = 5000 # more than MAX_MARSHAL_STACK_DEPTH
+ codes = (ExceptionTestCase.test_exceptions.__code__,) * count
+ marshal.loads(marshal.dumps(codes))
+
class ContainerTestCase(unittest.TestCase, HelperMixin):
d = {'astring': 'foo@bar.baz.spam',
'afloat': 7283.43,
Core and Builtins
-----------------
+- Issue #2957: Corrected a ValueError "recursion limit exceeded", when
+ unmarshalling many code objects, which happens when importing a
+ large .pyc file (~1000 functions).
+
- Issue #2963: fix merging oversight that disabled method cache for
all types.