summaryrefslogtreecommitdiff
path: root/sphinx/builders/changes.py
diff options
context:
space:
mode:
authorTakayuki Shimizukawa <shimizukawa@gmail.com>2014-04-29 21:20:56 +0900
committerTakayuki Shimizukawa <shimizukawa@gmail.com>2014-04-29 21:20:56 +0900
commitce4d342e20739ab994a451f367d5bce2c5edb5d2 (patch)
tree025c7e7b7248a22c3ee04d413635c385fc5e8c49 /sphinx/builders/changes.py
parentc3c879f2c63afbb39ad4d76ecc083cddd41d9946 (diff)
downloadsphinx-git-ce4d342e20739ab994a451f367d5bce2c5edb5d2.tar.gz
use six privided iteritems(),itervalues() to support py2/py3 in one source. refs #1350.
Diffstat (limited to 'sphinx/builders/changes.py')
-rw-r--r--sphinx/builders/changes.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/sphinx/builders/changes.py b/sphinx/builders/changes.py
index 3a52c713d..abc18388a 100644
--- a/sphinx/builders/changes.py
+++ b/sphinx/builders/changes.py
@@ -12,6 +12,8 @@
import codecs
from os import path
+from six import iteritems
+
from sphinx import package_dir
from sphinx.util import copy_static_entry
from sphinx.locale import _
@@ -93,9 +95,9 @@ class ChangesBuilder(Builder):
'version': version,
'docstitle': self.config.html_title,
'shorttitle': self.config.html_short_title,
- 'libchanges': sorted(libchanges.iteritems()),
+ 'libchanges': sorted(iteritems(libchanges)),
'apichanges': sorted(apichanges),
- 'otherchanges': sorted(otherchanges.iteritems()),
+ 'otherchanges': sorted(iteritems(otherchanges)),
'show_copyright': self.config.html_show_copyright,
'show_sphinx': self.config.html_show_sphinx,
}
@@ -142,7 +144,7 @@ class ChangesBuilder(Builder):
finally:
f.close()
themectx = dict(('theme_' + key, val) for (key, val) in
- self.theme.get_options({}).iteritems())
+ iteritems(self.theme.get_options({})))
copy_static_entry(path.join(package_dir, 'themes', 'default',
'static', 'default.css_t'),
self.outdir, self, themectx)