summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2016-02-16 07:30:32 -0500
committerTim Graham <timograham@gmail.com>2016-02-16 07:31:26 -0500
commitcc7ea1905ddb4ba444b4f358c26b6bd8f1f6c93b (patch)
tree38007ad8e3f115ecc210370b6b86332b6e85b4b5
parentca1f4390c432ba69898219a0f7d50c09b3a75781 (diff)
[1.9.x] Fixed possible "RuntimeError: maximum recursion depth exceeded" building docs.
Backport of 6a71ac61bd8ebd57f036e076a4f7f29cf2d88c00 from master
-rw-r--r--docs/conf.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/docs/conf.py b/docs/conf.py
index b23f62db48..b146392c0d 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -16,6 +16,15 @@ from __future__ import unicode_literals
import sys
from os.path import abspath, dirname, join
+# Workaround for sphinx-build recursion limit overflow:
+# pickle.dump(doctree, f, pickle.HIGHEST_PROTOCOL)
+# RuntimeError: maximum recursion depth exceeded while pickling an object
+#
+# Python's default allowed recursion depth is 1000 but this isn't enough for
+# building docs/ref/settings.txt sometimes.
+# https://groups.google.com/d/topic/sphinx-dev/MtRf64eGtv4/discussion
+sys.setrecursionlimit(2000)
+
# Make sure we get the version of this copy of Django
sys.path.insert(1, dirname(dirname(abspath(__file__))))