mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-09-03 20:52:55 -05:00
Merge pull request #2816 from embray/fix-domain-initial-data
Fix bug with copying of initial_data for Domains
This commit is contained in:
@@ -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)
|
||||
=====================================
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user