From 01c00dc631d5dd05337fe54e0d687f82548cc02f Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Tue, 16 Feb 2016 07:30:32 -0500 Subject: [PATCH] [1.7.x] Fixed possible "RuntimeError: maximum recursion depth exceeded" building docs. Backport of 6a71ac61bd8ebd57f036e076a4f7f29cf2d88c00 from master --- docs/conf.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/conf.py b/docs/conf.py index 6df8dd88b6..c16da836ee 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__))))