Merge pull request #2816 from embray/fix-domain-initial-data

Fix bug with copying of initial_data for Domains
This commit is contained in:
Takeshi KOMIYA
2016-08-20 00:40:03 +09:00
committed by GitHub
2 changed files with 4 additions and 1 deletions
+1
View File
@@ -26,6 +26,7 @@ Bugs fixed
* #2789: `sphinx.ext.intersphinx` generates wrong hyperlinks if the inventory is given
* parsing errors for caption of code-blocks are displayed in document (ref: #2845)
* #2846: ``singlehtml`` builder does not include figure numbers
* #2816: Fix data from builds cluttering the ``Domain.initial_data`` class attributes
Release 1.4.5 (released Jul 13, 2016)
=====================================
+3 -1
View File
@@ -10,6 +10,8 @@
:license: BSD, see LICENSE for details.
"""
import copy
from six import iteritems
from sphinx.errors import SphinxError
@@ -145,7 +147,7 @@ class Domain(object):
self.env = env
if self.name not in env.domaindata:
assert isinstance(self.initial_data, dict)
new_data = self.initial_data.copy()
new_data = copy.deepcopy(self.initial_data)
new_data['version'] = self.data_version
self.data = env.domaindata[self.name] = new_data
else: