From bdc230b1ccc189989789f82a55023f369410309d Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Thu, 4 Feb 2016 19:58:21 +0100 Subject: [PATCH] Closes #2295: Avoid mutating dictionary errors while enumerating members in autodoc with Python 3 --- CHANGES | 2 ++ sphinx/ext/autodoc.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 0db03d333..6a7bc2a8e 100644 --- a/CHANGES +++ b/CHANGES @@ -5,6 +5,8 @@ Bugs fixed ---------- * #2265: Fix babel is used in spite of disabling it on ``latex_elements`` +* #2295: Avoid mutating dictionary errors while enumerating members in autodoc + with Python 3 Release 1.3.5 (released Jan 24, 2016) diff --git a/sphinx/ext/autodoc.py b/sphinx/ext/autodoc.py index f906d9666..6f9e057aa 100644 --- a/sphinx/ext/autodoc.py +++ b/sphinx/ext/autodoc.py @@ -606,7 +606,7 @@ class Documenter(object): members = [] else: members = [(mname, self.get_attr(self.object, mname, None)) - for mname in obj_dict.keys()] + for mname in list(obj_dict.keys())] membernames = set(m[0] for m in members) # add instance attributes from the analyzer for aname in analyzed_member_names: