From f150be8d258cf19393bad90c8e235d5996febba8 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sun, 29 Jan 2012 11:28:09 +0100 Subject: [PATCH] Closes #854: Fix inheritance_diagram raising attribute errors on builtins. --- CHANGES | 2 ++ sphinx/ext/inheritance_diagram.py | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 7b83f3a0a..89b669cd7 100644 --- a/CHANGES +++ b/CHANGES @@ -31,6 +31,8 @@ Release 1.1.3 (in development) * #852: Fix HtmlHelp index entry links again. +* #854: Fix inheritance_diagram raising attribute errors on builtins. + Release 1.1.2 (Nov 1, 2011) -- 1.1.1 is a silly version number anyway! ====================================================================== diff --git a/sphinx/ext/inheritance_diagram.py b/sphinx/ext/inheritance_diagram.py index a2490486a..7dc57ab12 100644 --- a/sphinx/ext/inheritance_diagram.py +++ b/sphinx/ext/inheritance_diagram.py @@ -39,6 +39,7 @@ r""" import re import sys import inspect +import __builtin__ try: from hashlib import md5 except ImportError: @@ -142,7 +143,7 @@ class InheritanceGraph(object): displayed node names. """ all_classes = {} - builtins = __builtins__.values() + builtins = vars(__builtin__).values() def recurse(cls): if not show_builtins and cls in builtins: