summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES2
-rw-r--r--sphinx/ext/autodoc.py3
2 files changed, 4 insertions, 1 deletions
diff --git a/CHANGES b/CHANGES
index 50f63252..53974c52 100644
--- a/CHANGES
+++ b/CHANGES
@@ -64,6 +64,8 @@ Bugs fixed
* #1181: Report option errors in autodoc directives more gracefully.
+* #1155: Fix autodocumenting C-defined methods as attributes in Python 3.
+
Documentation
-------------
diff --git a/sphinx/ext/autodoc.py b/sphinx/ext/autodoc.py
index ad7b02bb..9d950a75 100644
--- a/sphinx/ext/autodoc.py
+++ b/sphinx/ext/autodoc.py
@@ -1244,7 +1244,8 @@ class AttributeDocumenter(ClassLevelDocumenter):
def can_document_member(cls, member, membername, isattr, parent):
isdatadesc = isdescriptor(member) and not \
isinstance(member, cls.method_types) and not \
- type(member).__name__ in ("type", "method_descriptor")
+ type(member).__name__ in ("type", "method_descriptor",
+ "instancemethod")
return isdatadesc or (not isinstance(parent, ModuleDocumenter)
and not inspect.isroutine(member)
and not isinstance(member, class_types))