From f460a976513281a96c20745419ae915ff5062533 Mon Sep 17 00:00:00 2001 From: Major Hayden Date: Mon, 26 Sep 2016 11:26:50 -0500 Subject: [PATCH] [Docs] Fix sphinx pickling error This patch adds a workaround for the pickling error that occasionally causes security role docs builds to fail, which certainly gets us in a pickle from time to time. The upstream bug is: sphinx-doc/sphinx#2324 Closes-Bug: 1627732 Change-Id: Iefbb9c920936634d276053d24bc225b2dec44362 --- doc/source/conf.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index 8aec2d65..7031634d 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 - +"""Documentation configuration for the openstack-ansible-security role.""" # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -33,6 +33,13 @@ import pbr.version # documentation root, use os.path.abspath to make it absolute, like shown here. sys.path.insert(0, os.path.join(os.path.abspath('.'), '_exts')) +# NOTE(mhayden): Since the security role docs are fairly lengthy and deeply +# nested in places, sphinx occasionally throws a pickling error as shown in +# Launchpad bug 1627732. Sphinx 1.4 now prints a recommendation in these +# situations to increase Python's recursion limit a bit higher to avoid the +# pickling error. +sys.setrecursionlimit(4000) + # -- General configuration ------------------------------------------------ # If your documentation needs a minimal Sphinx version, state it here.