Author: guido.van.rossum
Date: Wed Aug 29 20:44:54 2007
New Revision: 57672
Modified:
python/branches/py3k/Lib/test/test_marshal.py
Log:
Patch # 1050 by Amaury Forgeot d'Arc.
On Windows, debug builds insert stack probes, and recursive functions
tend to exhaust the stack faster.
This patch reduces the marshal maximum depth from 2000 to 1500 for debug
builds only. Optimized builds are not affected.
This allows test_marshal to pass with debug builds.
Modified: python/branches/py3k/Lib/test/test_marshal.py
==============================================================================
--- python/branches/py3k/Lib/test/test_marshal.py (original)
+++ python/branches/py3k/Lib/test/test_marshal.py Wed Aug 29 20:44:54 2007
@@ -169,7 +169,10 @@
# Create a deeply nested structure.
head = last = []
# The max stack depth should match the value in Python/marshal.c.
- MAX_MARSHAL_STACK_DEPTH = 2000
+ if os.name == 'nt' and hasattr(sys, 'gettotalrefcount'):
+ MAX_MARSHAL_STACK_DEPTH = 1500
+ else:
+ MAX_MARSHAL_STACK_DEPTH = 2000
for i in range(MAX_MARSHAL_STACK_DEPTH - 2):
last.append([0])
last = last[-1]
_______________________________________________
Python-3000-checkins mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000-checkins