summaryrefslogtreecommitdiffstats
path: root/Tools/scripts
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2011-01-23 17:21:28 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2011-01-23 17:21:28 (GMT)
commit0f2a61a11eccea4d4ecddc30147116aae5ec09ab (patch)
treebf064181dc86da53fad70677b8ff5ab85b2a5091 /Tools/scripts
parenteb9d5ad6ba3153d2016d6708e1a3b63ea740e149 (diff)
downloadcpython-0f2a61a11eccea4d4ecddc30147116aae5ec09ab.zip
cpython-0f2a61a11eccea4d4ecddc30147116aae5ec09ab.tar.gz
cpython-0f2a61a11eccea4d4ecddc30147116aae5ec09ab.tar.bz2
Merged revisions 88147 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r88147 | antoine.pitrou | 2011-01-23 18:12:25 +0100 (dim., 23 janv. 2011) | 3 lines Issue #10987: Fix the recursion limit handling in the _pickle module. ........
Diffstat (limited to 'Tools/scripts')
-rw-r--r--Tools/scripts/find_recursionlimit.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Tools/scripts/find_recursionlimit.py b/Tools/scripts/find_recursionlimit.py
index 2e202be..6f75d6d 100644
--- a/Tools/scripts/find_recursionlimit.py
+++ b/Tools/scripts/find_recursionlimit.py
@@ -77,14 +77,15 @@ def test_cpickle(_cache={}):
except ImportError:
print("cannot import _pickle, skipped!")
return
- l = None
+ k, l = None, None
for n in itertools.count():
try:
l = _cache[n]
continue # Already tried and it works, let's save some time
except KeyError:
for i in range(100):
- l = [l]
+ l = [k, l]
+ k = {i: l}
_pickle.Pickler(io.BytesIO(), protocol=-1).dump(l)
_cache[n] = l