{"action":"opened","issue":{"url":"https://api.github.com/repos/sphinx-doc/testing2/issues/1589","labels_url":"https://api.github.com/repos/sphinx-doc/testing2/issues/1589/labels{/name}","comments_url":"https://api.github.com/repos/sphinx-doc/testing2/issues/1589/comments","events_url":"https://api.github.com/repos/sphinx-doc/testing2/issues/1589/events","html_url":"https://github.com/sphinx-doc/testing2/issues/1589","id":53301760,"number":1589,"title":"Python2.6.9 and autodoc cause error on abstractproperty","user":{"login":"shimizukawa","id":151623,"avatar_url":"https://avatars.githubusercontent.com/u/151623?v=3","gravatar_id":"","url":"https://api.github.com/users/shimizukawa","html_url":"https://github.com/shimizukawa","followers_url":"https://api.github.com/users/shimizukawa/followers","following_url":"https://api.github.com/users/shimizukawa/following{/other_user}","gists_url":"https://api.github.com/users/shimizukawa/gists{/gist_id}","starred_url":"https://api.github.com/users/shimizukawa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shimizukawa/subscriptions","organizations_url":"https://api.github.com/users/shimizukawa/orgs","repos_url":"https://api.github.com/users/shimizukawa/repos","events_url":"https://api.github.com/users/shimizukawa/events{/privacy}","received_events_url":"https://api.github.com/users/shimizukawa/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/sphinx-doc/testing2/labels/autodoc","name":"autodoc","color":"FFFFFF"},{"url":"https://api.github.com/repos/sphinx-doc/testing2/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-03T11:35:23Z","updated_at":"2015-01-03T11:35:23Z","closed_at":null,"body":"## Short version ##\n/path/to/repo/docs/test.py:docstring of repo.test.Foo.bar:14: ERROR: Unexpected indentation.\n\nI have tried python2.6 and python2.7, with this error occurring only on the former. abc.abstractproperty's docstring has not changed between the versions, and it appears to be the cause.  This indicates a version specific parsing error in sphinx.\n\n## Long Version ##\nConsider a simple module we are calling autodoc on:\n\n```\n#!python\n\n\"\"\"Toy example for bug report.\"\"\"\n\nfrom abc import ABCMeta, abstractproperty\n\n\nclass Foo(object):\n\n    \"\"\"Handles foo things.\"\"\"\n\n    __metaclass__ = ABCMeta\n\n    @abstractproperty\n    def bar(self):\n        \"\"\"Bar must be implemented by Foo subclasses.\"\"\"\n        raise NotImplementedError\n\n```\nIf you try to build this (on python2.6; On python2.7 it succeeds), you get back an error like:\n\n/path/to/repo/docs/test.py:docstring of repo.test.Foo.bar:14: ERROR: Unexpected indentation.\n\nRemoving the `@abstractproperty` makes the issue vanish.  Therefore replacing it with the following should show us what is wrong with abstractproperty:\n\n```\n#!python\n\n\"\"\"Toy example for bug report.\"\"\"\n\nfrom abc import ABCMeta\n\n# Implement abc.abstractproperty manually for docs\nclass abstractproperty(property):\n    \"\"\"A decorator indicating abstract properties.\n\n    Requires that the metaclass is ABCMeta or derived from it.  A\n    class that has a metaclass derived from ABCMeta cannot be\n    instantiated unless all of its abstract properties are overridden.\n    The abstract properties can be called using any of the normal\n    'super' call mechanisms.\n\n    Usage:\n\n        class C:\n            __metaclass__ = ABCMeta\n            @abstractproperty\n            def my_abstract_property(self):\n                ...\n\n    This defines a read-only property; you can also define a read-write\n    abstract property using the 'long' form of property declaration:\n\n        class C:\n            __metaclass__ = ABCMeta\n            def getx(self): ...\n            def setx(self, value): ...\n            x = abstractproperty(getx, setx)\n    \"\"\"\n    __isabstractmethod__ = True\n\n\nclass Foo(object):\n\n    \"\"\"Handles foo things.\"\"\"\n\n    __metaclass__ = ABCMeta\n\n    @abstractproperty\n    def bar(self):\n        \"\"\"Bar must be implemented by Foo subclasses.\"\"\"\n        raise NotImplementedError\n\n```\n\nThe same error occurs when the above is built, but on line 15 of abstractproperty's docs.\n\n----------------------------------------\n- Bitbucket: https://bitbucket.org/birkenfeld/sphinx/issue/1589\n- Originally reported by: Glen Nelson\n- Originally created at: 2014-10-08T19:20:42.876\n"}}